From 4bdba629fb8d1e734f99f6123aedd76f6ca08251 Mon Sep 17 00:00:00 2001 From: Matt Williams Date: Tue, 21 Dec 2010 21:11:36 +0000 Subject: [PATCH] Add stub of test to compile the Material class. --- tests/CMakeLists.txt | 4 ++++ tests/testmaterial.cpp | 37 +++++++++++++++++++++++++++++++++++++ tests/testmaterial.h | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 tests/testmaterial.cpp create mode 100644 tests/testmaterial.h diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 72a237ff..5e247f0c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,3 +34,7 @@ ADD_TEST(VectorDotProductTest ${LATEST_TEST} testDotProduct) # Volume tests CREATE_TEST(testvolume.h testvolume.cpp testvolume) ADD_TEST(VolumeSizeTest ${LATEST_TEST} testSize) + +# Material tests +CREATE_TEST(testmaterial.h testmaterial.cpp testmaterial) +ADD_TEST(MaterialTestCompile ${LATEST_TEST} testCompile) diff --git a/tests/testmaterial.cpp b/tests/testmaterial.cpp new file mode 100644 index 00000000..efd470b2 --- /dev/null +++ b/tests/testmaterial.cpp @@ -0,0 +1,37 @@ +/******************************************************************************* +Copyright (c) 2010 Matt Williams + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*******************************************************************************/ + +#include "testmaterial.h" + +#include + +#include + +using namespace PolyVox; + +void TestMaterial::testCompile() +{ + Material8 material; +} + +QTEST_MAIN(TestMaterial) diff --git a/tests/testmaterial.h b/tests/testmaterial.h new file mode 100644 index 00000000..c9a19800 --- /dev/null +++ b/tests/testmaterial.h @@ -0,0 +1,37 @@ +/******************************************************************************* +Copyright (c) 2010 Matt Williams + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*******************************************************************************/ + +#ifndef __PolyVox_TestMaterial_H__ +#define __PolyVox_TestMaterial_H__ + +#include + +class TestMaterial: public QObject +{ + Q_OBJECT + + private slots: + void testCompile(); +}; + +#endif