From 55ebc25c0f2b5944752530c07abdf84f5185b89d Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 14 Jul 2017 17:59:27 -0400 Subject: [PATCH] NXTTest: Make GTest print the name of the backend --- src/tests/NXTTest.cpp | 4 ++++ src/tests/NXTTest.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/tests/NXTTest.cpp b/src/tests/NXTTest.cpp index a27ce83c56..2b1ad2f8ed 100644 --- a/src/tests/NXTTest.cpp +++ b/src/tests/NXTTest.cpp @@ -277,6 +277,10 @@ std::ostream& operator<< (std::ostream& stream, const RGBA8& color) { static_cast(color.a) << ")"; } +std::ostream &operator<<(std::ostream& stream, BackendType backend) { + return stream << ParamName(backend); +} + namespace detail { bool IsBackendAvailable(BackendType type) { switch (type) { diff --git a/src/tests/NXTTest.h b/src/tests/NXTTest.h index 39c5191162..25fde9cc3e 100644 --- a/src/tests/NXTTest.h +++ b/src/tests/NXTTest.h @@ -47,6 +47,7 @@ enum BackendType { VulkanBackend, NumBackendTypes, }; +std::ostream &operator<<(std::ostream& stream, BackendType backend); namespace utils { class BackendBinding;