Skip to content

Commit

Permalink
pw_unit_test migration: lib support batch 5 (#33238)
Browse files Browse the repository at this point in the history
* pw_unit_test migration: lib support batch 5

* pw_unit_test migration: lib support batch 4 (#33199)

* pw_unit_test migration: lib support batch 4

* fix merge error BUILD.gn

* pw_unit_test migration: lib support batch 5

* newline

* removing commented-out code

* convert TestCHIPArgParser test
  • Loading branch information
Alami-Amine authored May 1, 2024
1 parent a8cfbac commit 007e11d
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 529 deletions.
1 change: 0 additions & 1 deletion src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ if (chip_build_tests) {
"${chip_root}/src/credentials/tests",
"${chip_root}/src/lib/format/tests",
"${chip_root}/src/lib/support/tests",
"${chip_root}/src/lib/support/tests:tests_nltest",
"${chip_root}/src/protocols/secure_channel/tests",
"${chip_root}/src/protocols/secure_channel/tests:tests_nltest",
"${chip_root}/src/system/tests",
Expand Down
39 changes: 5 additions & 34 deletions src/lib/support/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -40,60 +40,33 @@ chip_test_suite("tests") {
"TestJsonToTlv.cpp",
"TestJsonToTlvToJson.cpp",
"TestPersistedCounter.cpp",
"TestPool.cpp",
"TestPrivateHeap.cpp",
"TestSafeInt.cpp",
"TestSafeString.cpp",
"TestScoped.cpp",
"TestScopedBuffer.cpp",
"TestSorting.cpp",
"TestSpan.cpp",
"TestStateMachine.cpp",
"TestStaticSupportSmartPtr.cpp",
"TestStringBuilder.cpp",
"TestStringSplitter.cpp",
"TestTestPersistentStorageDelegate.cpp",
"TestThreadOperationalDataset.cpp",
"TestTimeUtils.cpp",
"TestTlvJson.cpp",
"TestTlvToJson.cpp",
"TestUtf8.cpp",
"TestVariant.cpp",
"TestZclString.cpp",
]
sources = []

cflags = [
"-Wconversion",

# TODO(#21255): work-around for SimpleStateMachine constructor issue.
"-Wno-uninitialized",

# TestStringSplitter intentionally validates string overflows.
"-Wno-stringop-truncation",
]

public_deps = [
"${chip_root}/src/credentials",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support:static-support",
"${chip_root}/src/lib/support:testing",
"${chip_root}/src/lib/support/jsontlv",
"${chip_root}/src/platform",
]
}

chip_test_suite_using_nltest("tests_nltest") {
output_name = "libSupportTestsNL"

test_sources = [
"TestPool.cpp",
"TestStateMachine.cpp",
"TestThreadOperationalDataset.cpp",
]
sources = []

if (current_os != "mbed") {
test_sources += [ "TestCHIPArgParser.cpp" ]
}

sources = []

cflags = [
"-Wconversion",

Expand All @@ -109,9 +82,7 @@ chip_test_suite_using_nltest("tests_nltest") {
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support:static-support",
"${chip_root}/src/lib/support:testing",
"${chip_root}/src/lib/support:testing_nlunit",
"${chip_root}/src/lib/support/jsontlv",
"${chip_root}/src/platform",
"${nlunit_test_root}:nlunit-test",
]
}
214 changes: 80 additions & 134 deletions src/lib/support/tests/TestCHIPArgParser.cpp

Large diffs are not rendered by default.

Loading

0 comments on commit 007e11d

Please sign in to comment.