Skip to content

Commit

Permalink
Ignore __tvm_main__ in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunderberg committed May 30, 2023
1 parent a42df45 commit fe44c73
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/cpp/c_codegen_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,11 @@ TEST(CCodegen, FunctionOrder) {
auto module = build(inputs, Target());
Array<String> func_array = module->GetFunction("get_func_names", false)();
std::vector<std::string> functions{func_array.begin(), func_array.end()};
// The entry point is handled separately from the other functions.
functions.erase(std::remove_if(functions.begin(), functions.end(),
[](const std::string& name) {
return name == tvm::runtime::symbol::tvm_module_main;
}),
functions.end());
EXPECT_TRUE(std::is_sorted(functions.begin(), functions.end()));
}

0 comments on commit fe44c73

Please sign in to comment.