本文整理汇总了C++中testing::Ne方法的典型用法代码示例。如果您正苦于以下问题:C++ testing::Ne方法的具体用法?C++ testing::Ne怎么用?C++ testing::Ne使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testing
的用法示例。
在下文中一共展示了testing::Ne方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Ne
TEST(NAME, empty_directory)
{
struct list_t* list = list_create();
#define SEARCH_DIR_EMPTY "tests/test_dir/empty/"
EXPECT_THAT(get_directory_listing(list, SEARCH_DIR_EMPTY), Ne(0));
EXPECT_THAT(list->count, Eq(2)); /* current and parent directory */
EXPECT_THAT(list_find(list, SEARCH_DIR_EMPTY "."), Ne(0));
EXPECT_THAT(list_find(list, SEARCH_DIR_EMPTY ".."), Ne(0));
LIST_FOR_EACH(list, char, file)
free_string(file);
list_destroy(list);
}
示例2: Reset
TEST_F(AntennaDriverTest, TestHardResetBothChannelsFailure)
{
EXPECT_CALL(primary, Reset(ANTENNA_PRIMARY_CHANNEL)).WillOnce(Return(OSResult::DeviceNotFound));
EXPECT_CALL(primary, Reset(ANTENNA_BACKUP_CHANNEL)).WillOnce(Return(OSResult::DeviceNotFound));
const auto result = driver.HardReset(&driver);
ASSERT_THAT(result, Ne(OSResult::Success));
}
示例3: CancelAntennaDeployment
TEST_F(AntennaDriverTest, TestFinishDeploymentDisarmingFailure)
{
ON_CALL(primary, CancelAntennaDeployment(_)).WillByDefault(Return(OSResult::Success));
ON_CALL(primary, DisarmDeploymentSystem(_)).WillByDefault(Return(OSResult::DeviceNotFound));
const auto result = driver.FinishDeployment(&driver, ANTENNA_PRIMARY_CHANNEL);
ASSERT_THAT(result, Ne(OSResult::Success));
}
示例4: ArmDeploymentSystem
TEST_F(AntennaDriverTest, TestManualDeploymentFailure)
{
ON_CALL(primary, ArmDeploymentSystem(_)).WillByDefault(Return(OSResult::Success));
EXPECT_CALL(primary, DeployAntenna(ANTENNA_BACKUP_CHANNEL, ANTENNA3_ID, _, false)).WillOnce(Return(OSResult::DeviceNotFound));
const auto status = driver.DeployAntenna(&driver, ANTENNA_BACKUP_CHANNEL, ANTENNA3_ID, TimeSpanFromSeconds(20), false);
ASSERT_THAT(status, Ne(OSResult::Success));
}
示例5: GetTemperature
TEST_F(AntennaDriverTest, TestGetTemperatureFailure)
{
EXPECT_CALL(primary, GetTemperature(ANTENNA_BACKUP_CHANNEL, _)).WillOnce(Return(OSResult::IOError));
uint16_t result;
const auto status = driver.GetTemperature(&driver, ANTENNA_BACKUP_CHANNEL, &result);
ASSERT_THAT(status, Ne(OSResult::Success));
}
示例6: WriteRead
TEST_F(AntennaMiniportTest, TestAntennaTemperatureFailure)
{
EXPECT_CALL(i2c, WriteRead(ANTENNA_PRIMARY_CHANNEL, ElementsAre(QueryTemperature), _)).WillOnce(Return(I2CResult::Nack));
uint16_t response;
const auto status = miniport.GetTemperature(&miniport, &i2c, ANTENNA_PRIMARY_CHANNEL, &response);
ASSERT_THAT(status, Ne(OSResult::Success));
ASSERT_THAT(response, Eq(0u));
}
示例7: InstallProxy
TEST_F(TimeTaskTest, TestTimeUpdateFailure)
{
auto proxy = InstallProxy(&mock);
EXPECT_CALL(mock, TakeSemaphore(_, _)).WillOnce(Return(OSResult::IOError));
provider.CurrentTime = TimeSpanFromSeconds(12345678);
const auto result = updateDescriptor.updateProc(state, updateDescriptor.param);
ASSERT_THAT(result, Eq(UpdateResult::Warning));
ASSERT_THAT(state.Time, Ne(TimeSpanFromSeconds(12345678)));
}
示例8: Write
TEST_F(AntennaMiniportTest, TestAutomaticDeploymentFailure)
{
EXPECT_CALL(i2c, Write(ANTENNA_PRIMARY_CHANNEL, BeginsWith(StartDeployment))).WillOnce(Return(I2CResult::Nack));
const auto status = miniport.InitializeAutomaticDeployment(&miniport, &i2c, ANTENNA_PRIMARY_CHANNEL, TimeSpanFromSeconds(200));
ASSERT_THAT(status, Ne(OSResult::Success));
}
示例9: Ne
TEST_F(AntennaMiniportTest, TestDisarmingDeploymentFailure)
{
i2c.ExpectWriteCommand(ANTENNA_PRIMARY_CHANNEL, Disarm).WillOnce(Return(I2CResult::Nack));
const auto status = miniport.DisarmDeploymentSystem(&miniport, &i2c, ANTENNA_PRIMARY_CHANNEL);
ASSERT_THAT(status, Ne(OSResult::Success));
}