Skip to content

Commit fe44c73

Browse files
committed
Ignore __tvm_main__ in unit test
1 parent a42df45 commit fe44c73

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/cpp/c_codegen_test.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,11 @@ TEST(CCodegen, FunctionOrder) {
121121
auto module = build(inputs, Target());
122122
Array<String> func_array = module->GetFunction("get_func_names", false)();
123123
std::vector<std::string> functions{func_array.begin(), func_array.end()};
124+
// The entry point is handled separately from the other functions.
125+
functions.erase(std::remove_if(functions.begin(), functions.end(),
126+
[](const std::string& name) {
127+
return name == tvm::runtime::symbol::tvm_module_main;
128+
}),
129+
functions.end());
124130
EXPECT_TRUE(std::is_sorted(functions.begin(), functions.end()));
125131
}

0 commit comments

Comments
 (0)