@@ -130,7 +130,6 @@ void TestEnumLayers(uint32_t& total, uint32_t& passed, uint32_t& skipped, uint32
130130#endif
131131 try {
132132 XrResult test_result = XR_SUCCESS;
133- uint32_t num_before_explicit = 0 ;
134133 std::vector<XrApiLayerProperties> layer_props;
135134
136135#if FILTER_OUT_LOADER_ERRORS == 1
@@ -186,9 +185,8 @@ void TestEnumLayers(uint32_t& total, uint32_t& passed, uint32_t& skipped, uint32
186185 }
187186 }
188187 }
189- num_before_explicit = out_layer_value;
190188
191- // Tests with some explicit layers added
189+ // Tests with some explicit layers instead
192190 in_layer_value = 0 ;
193191 out_layer_value = 0 ;
194192 subtest_name = " Simple explicit layers" ;
@@ -206,9 +204,8 @@ void TestEnumLayers(uint32_t& total, uint32_t& passed, uint32_t& skipped, uint32
206204 cout << " Failed with return " << std::to_string (test_result) << endl;
207205 local_failed++;
208206 } else {
209- if (out_layer_value != num_before_explicit + num_valid_jsons) {
210- cout << " Failed, expected count " << (num_before_explicit + num_valid_jsons) << " (" << num_before_explicit
211- << " seen earlier plus " << num_valid_jsons << " we added), got " << std::to_string (out_layer_value) << endl;
207+ if (out_layer_value != num_valid_jsons) {
208+ cout << " Failed, expected count " << num_valid_jsons << " , got " << std::to_string (out_layer_value) << endl;
212209 local_failed++;
213210 } else {
214211 local_passed++;
@@ -463,6 +460,11 @@ void TestEnumInstanceExtensions(uint32_t& total, uint32_t& passed, uint32_t& ski
463460 }
464461 }
465462 }
463+ } catch (std::exception const & e) {
464+ cout << " Exception triggered during test (" << e.what () << " ), automatic failure" << endl;
465+ local_failed++;
466+ local_total++;
467+
466468 } catch (...) {
467469 cout << " Exception triggered during test, automatic failure" << endl;
468470 local_failed++;
0 commit comments