gtest in library is hard (#3998)
* Revert "Revert "JNI for test coverage #3965""
This reverts commit 7566328816
.
* JNI for test coverage #3965
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
parent
330e4065fe
commit
05e8f7f6d4
|
@ -12,5 +12,7 @@ public class JniUnitTest {
|
|||
EngineLogic engineLogic = new EngineLogic();
|
||||
String version = engineLogic.getVersion();
|
||||
assertTrue("Got " + version, version.contains("Hello"));
|
||||
|
||||
engineLogic.invokePeriodicCallback();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,9 +135,12 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
|
|||
|
||||
EngineTestHelper::~EngineTestHelper() {
|
||||
// Write history to file
|
||||
std::stringstream filePath;
|
||||
filePath << "unittest_" << ::testing::UnitTest::GetInstance()->current_test_info()->name() << ".logicdata";
|
||||
writeEvents(filePath.str().c_str());
|
||||
extern bool hasInitGtest;
|
||||
if (hasInitGtest) {
|
||||
std::stringstream filePath;
|
||||
filePath << "unittest_" << ::testing::UnitTest::GetInstance()->current_test_info()->name() << ".logicdata";
|
||||
writeEvents(filePath.str().c_str());
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
enginePins.reset();
|
||||
|
|
Loading…
Reference in New Issue