Add test utilities for getting instance layers and extensions
authorCharles Giessen <charles@lunarg.com>
Thu, 4 May 2023 23:32:19 +0000 (17:32 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 29 May 2023 23:45:08 +0000 (17:45 -0600)
commit049d082882f860a5c2dcca28959694d6814116ed
tree5a52c6995f19e9947618448f6fd7d9d778148f13
parent7990f7f0e6d179cc5e9b2bdfd6d5c495a1aaafd8
Add test utilities for getting instance layers and extensions

Since it is incredibly common for tests to query the instance layers and
extensions, add helper functions to ease the enumeration of them and place the
results into an output vector, as well as check that the expected count is
equalt to the real count.

The GetActiveLayers function which did not take an expected count was removed
as tests should always know the exact number of layers that are present.

ASSERT_NO_FATAL_FAILURE was added to anyplace that queried extensions or layers
but requested a count of 0. This was done to insure that future maintainers do
not remove the seemingly redudant query of 0, as it is very much a part of the
test code since there are EXPECT macros inside the respective enumeration
utility functions.
tests/framework/test_environment.cpp
tests/framework/test_environment.h
tests/loader_layer_tests.cpp
tests/loader_regression_tests.cpp