Skip to content

Commit 5a5fab7

Browse files
authored
raise reasonable error when verifing program w/o expected outputs
Differential Revision: D71361076 Pull Request resolved: #9347
1 parent b8a0edd commit 5a5fab7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

devtools/bundled_program/bundled_program.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,11 @@ ET_NODISCARD Error verify_method_outputs(
361361
auto bundled_expected_outputs =
362362
method_test.get()->test_cases()->Get(testset_idx)->expected_outputs();
363363

364+
if (bundled_expected_outputs->size() == 0) {
365+
// No bundled expected outputs, so we can't verify the method outputs.
366+
return Error::NotSupported;
367+
}
368+
364369
for (size_t output_idx = 0; output_idx < method.outputs_size();
365370
output_idx++) {
366371
auto bundled_expected_output =

0 commit comments

Comments
 (0)