This is an automated email from the ASF dual-hosted git repository.
tlopex pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 8ab96af40e [TEST] Refactor: remove the deprecated warning message
check from test cases (#18419)
8ab96af40e is described below
commit 8ab96af40e9f966f579436ca801e08d41b569516
Author: Neo Chien <[email protected]>
AuthorDate: Wed Nov 5 12:08:40 2025 +0800
[TEST] Refactor: remove the deprecated warning message check from test
cases (#18419)
[#17640] Refactor: remove the depreation warning from test cases
Co-authored-by: cchung100m <[email protected]>
---
tests/cpp/target_test.cc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/cpp/target_test.cc b/tests/cpp/target_test.cc
index 6cea161f74..ba959672a8 100644
--- a/tests/cpp/target_test.cc
+++ b/tests/cpp/target_test.cc
@@ -57,13 +57,12 @@ TVM_REGISTER_TARGET_KIND("TestTargetParser", kDLCPU)
TVM_REGISTER_TARGET_KIND("TestAttrsPreprocessor", kDLCPU)
.add_attr_option<ffi::String>("mattr")
.set_default_keys({"cpu"})
- .set_attrs_preprocessor(TestAttrsPreProcessor);
+ .set_target_parser(TestAttrsPreProcessor);
TVM_REGISTER_TARGET_KIND("TestClashingPreprocessor", kDLCPU)
.add_attr_option<ffi::String>("mattr")
.add_attr_option<ffi::String>("mcpu")
.set_default_keys({"cpu"})
- .set_attrs_preprocessor(TestAttrsPreProcessor)
.set_target_parser(TestTargetParser);
TEST(TargetKind, GetAttrMap) {
@@ -201,8 +200,10 @@ TEST(TargetCreation, TargetAttrsPreProcessor) {
ASSERT_EQ(test_target->GetAttr<ffi::String>("mattr").value(), "woof");
}
-TEST(TargetCreation, ClashingTargetProcessing) {
- EXPECT_THROW(Target test("TestClashingPreprocessor -mcpu=woof -mattr=cake"),
ffi::Error);
+TEST(TargetCreation, TargetParserProcessing) {
+ Target test_target("TestClashingPreprocessor -mcpu=woof -mattr=cake");
+ ASSERT_EQ(test_target->GetAttr<ffi::String>("mcpu").value(), "super_woof");
+ ASSERT_EQ(test_target->GetAttr<ffi::String>("mattr").value(), "cake");
}
TVM_REGISTER_TARGET_KIND("TestStringKind", kDLCPU)