mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 07:07:46 +00:00
[test] use cmake to run unit tests (#8724)
This commit migrates unit tests to cmake. * build unit tests with cmake * add missing tests in cmake * use ctest * add platform udp stubs for test platform * skip some static_assert with gcc-4
This commit is contained in:
@@ -309,12 +309,15 @@ void TestStringToLowercase(void)
|
||||
printf(" -- PASS\n");
|
||||
}
|
||||
|
||||
// gcc-4 does not support constexpr function
|
||||
#if __GNUC__ > 4
|
||||
static_assert(ot::AreStringsInOrder("a", "b"), "AreStringsInOrder() failed");
|
||||
static_assert(ot::AreStringsInOrder("aa", "aaa"), "AreStringsInOrder() failed");
|
||||
static_assert(ot::AreStringsInOrder("", "a"), "AreStringsInOrder() failed");
|
||||
static_assert(!ot::AreStringsInOrder("cd", "cd"), "AreStringsInOrder() failed");
|
||||
static_assert(!ot::AreStringsInOrder("z", "abcd"), "AreStringsInOrder() failed");
|
||||
static_assert(!ot::AreStringsInOrder("0", ""), "AreStringsInOrder() failed");
|
||||
#endif
|
||||
|
||||
} // namespace ot
|
||||
|
||||
|
||||
Reference in New Issue
Block a user