abroekhuis commented on a change in pull request #168: Refactors dfi tests from
cpputest to google test
URL: https://github.com/apache/celix/pull/168#discussion_r390799111
##########
File path: libs/dfi/gtest/src/dyn_avpr_function_tests.cpp
##########
@@ -219,27 +219,32 @@ const char* theAvprFile = "{ \
}\
}";
-TEST_GROUP(DynAvprFunctionTests) {
- void setup() override {
+
+class DynAvprFunctionTests : public ::testing::Test {
+public:
+ DynAvprFunctionTests() {
int lvl = 1;
dynAvprFunction_logSetup(stdLog, nullptr, lvl);
dynAvprType_logSetup(stdLog, nullptr, lvl);
}
+ ~DynAvprFunctionTests() override {
+ }
+
};
// Test 1, simple function with three arguments and a return type
static int avpr_example1(__attribute__((unused)) void* handle, int32_t a,
int32_t b, int32_t c, int32_t * out) {
- CHECK_EQUAL(2, a);
- CHECK_EQUAL(4, b);
- CHECK_EQUAL(8, c);
+ EXPECT_EQ(2, a);
Review comment:
Sometimes I see EXPECT_xxx and sometimes ASSERT_xxx, what is the preferred
variant?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services