mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
[test] Rename target ResultValueRValue to ResultValue
This commit is contained in:
parent
a7f155f6bc
commit
52dc8eb2fe
@ -14,25 +14,25 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.2)
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
|
||||||
project(ResultValueRValue)
|
project(ResultValue)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
ResultValueRValue.cpp
|
ResultValue.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group(headers FILES ${HEADERS})
|
source_group(headers FILES ${HEADERS})
|
||||||
source_group(sources FILES ${SOURCES})
|
source_group(sources FILES ${SOURCES})
|
||||||
|
|
||||||
add_library(ResultValueRValue
|
add_library(ResultValue
|
||||||
${HEADERS}
|
${HEADERS}
|
||||||
${SOURCES}
|
${SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries(ResultValueRValue "-ldl")
|
target_link_libraries(ResultValue "-ldl")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(ResultValueRValue PROPERTIES FOLDER "Tests")
|
set_target_properties(ResultValue PROPERTIES FOLDER "Tests")
|
@ -12,7 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
// VulkanHpp Test: Compile only test for issue 589.
|
// VulkanHpp Tests : ResultValue
|
||||||
|
// Compile-test for ResultValue
|
||||||
|
|
||||||
#define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
|
#define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
|
||||||
|
|
||||||
@ -20,18 +21,19 @@
|
|||||||
|
|
||||||
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||||
|
|
||||||
|
// Compile only test for issue 589.
|
||||||
|
void test_conversion()
|
||||||
|
{
|
||||||
#if defined(VULKAN_DISABLE_IMPLICIT_RESULT_VALUE_CAST)
|
#if defined(VULKAN_DISABLE_IMPLICIT_RESULT_VALUE_CAST)
|
||||||
static_assert(false, "Conversions not enabled");
|
static_assert(false, "Conversions not enabled");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void as_value(int) {}
|
void as_value(int);
|
||||||
void as_ref(int&) {}
|
void as_ref(int&);
|
||||||
void as_cref(const int&) {}
|
void as_cref(const int&);
|
||||||
void as_rvref(int&&) {}
|
void as_rvref(int&&);
|
||||||
void as_crvref(const int&&) {}
|
void as_crvref(const int&&);
|
||||||
|
|
||||||
void test()
|
|
||||||
{
|
|
||||||
using result = vk::ResultValue<int>;
|
using result = vk::ResultValue<int>;
|
||||||
|
|
||||||
auto val = result {vk::Result{}, 42};
|
auto val = result {vk::Result{}, 42};
|
Loading…
Reference in New Issue
Block a user