Skip to content

Commit

Permalink
[Java] Add unit tests for TLV kotlin lib (project-chip#25639)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored Mar 13, 2023
1 parent e5c1a3b commit 736d358
Show file tree
Hide file tree
Showing 7 changed files with 1,436 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/java-matter-controller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ kotlin_binary("java-matter-controller") {
output_name = "java-matter-controller"
deps = [
":java",
"${chip_root}/src/controller/java:tlv_read_write_test",
"${chip_root}/src/controller/java:tlv_reader_test",
"${chip_root}/src/controller/java:tlv_writer_test",
"${chip_root}/third_party/java_deps:kotlin-stdlib",
]

Expand Down
43 changes: 43 additions & 0 deletions src/controller/java/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,49 @@ kotlin_library("tlv") {
kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("tlv_reader_test") {
output_name = "TlvReaderTest.jar"

deps = [
":tlv",
"${chip_root}/third_party/java_deps:junit-4",
"${chip_root}/third_party/java_deps:truth",
]

sources = [ "tests/chip/tlv/TlvReaderTest.kt" ]

kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("tlv_writer_test") {
output_name = "TlvWriterTest.jar"

deps = [
":tlv",
"${chip_root}/third_party/java_deps:junit-4",
"${chip_root}/third_party/java_deps:truth",
]

sources = [ "tests/chip/tlv/TlvWriterTest.kt" ]

kotlinc_flags = [ "-Xlint:deprecation" ]
}

kotlin_library("tlv_read_write_test") {
output_name = "TlvReadWriteTest.jar"

deps = [
":tlv",
"${chip_root}/third_party/java_deps:junit-4",
"${chip_root}/third_party/java_deps:kotlin-test",
"${chip_root}/third_party/java_deps:truth",
]

sources = [ "tests/chip/tlv/TlvReadWriteTest.kt" ]

kotlinc_flags = [ "-Xlint:deprecation" ]
}

android_library("java") {
output_name = "CHIPController.jar"

Expand Down
Loading

0 comments on commit 736d358

Please sign in to comment.