|
|
|
@ -3,6 +3,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
|
|
|
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016 |
|
|
|
Vladimír Vondruš <mosra@centrum.cz> |
|
|
|
Vladimír Vondruš <mosra@centrum.cz> |
|
|
|
|
|
|
|
Copyright © 2016 Jonathan Hale <squareys@googlemail.com> |
|
|
|
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a |
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a |
|
|
|
copy of this software and associated documentation files (the "Software"), |
|
|
|
copy of this software and associated documentation files (the "Software"), |
|
|
|
@ -33,21 +34,26 @@ namespace Magnum { namespace Test { |
|
|
|
struct ContextTest: TestSuite::Tester { |
|
|
|
struct ContextTest: TestSuite::Tester { |
|
|
|
explicit ContextTest(); |
|
|
|
explicit ContextTest(); |
|
|
|
|
|
|
|
|
|
|
|
void debugFlag(); |
|
|
|
void createAndDestroy(); |
|
|
|
|
|
|
|
void flag(); |
|
|
|
|
|
|
|
void result(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
ContextTest::ContextTest() { |
|
|
|
ContextTest::ContextTest() { |
|
|
|
addTests({&ContextTest::debugFlag}); |
|
|
|
addTests({&ContextTest::createAndDestroy, |
|
|
|
|
|
|
|
&ContextTest::flag, |
|
|
|
|
|
|
|
&ContextTest::result}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ContextTest::debugFlag() { |
|
|
|
void ContextTest::createAndDestroy() { |
|
|
|
#ifdef MAGNUM_TARGET_WEBGL |
|
|
|
Vk::Context c{{}}; |
|
|
|
CORRADE_SKIP("No context flags on Emscripten yet."); |
|
|
|
CORRADE_COMPARE(c.version(), Vk::Version::Vulkan_1_0); |
|
|
|
#else |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ContextTest::flag() { |
|
|
|
std::ostringstream out; |
|
|
|
std::ostringstream out; |
|
|
|
Debug(&out) << Context::Flag::Debug << Context::Flag(0xdead); |
|
|
|
Debug(&out) << Context::Flag::Debug << Context::Flag(0xdead); |
|
|
|
CORRADE_COMPARE(out.str(), "Context::Flag::Debug Context::Flag(0xdead)\n"); |
|
|
|
CORRADE_COMPARE(out.str(), "Context::Flag::Debug Context::Flag(0xdead)\n"); |
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}} |
|
|
|
}} |
|
|
|
|