diff --git a/code/Exceptional.h b/code/Exceptional.h index e04da757c..3268423ef 100644 --- a/code/Exceptional.h +++ b/code/Exceptional.h @@ -58,8 +58,8 @@ class DeadlyImportError { public: /** Constructor with arguments */ - explicit DeadlyImportError( const std::string& pErrorText) - : runtime_error(pErrorText) + explicit DeadlyImportError( const std::string& errorText) + : runtime_error(errorText) { } diff --git a/include/assimp/Exporter.hpp b/include/assimp/Exporter.hpp index 079060f4b..18f5fb744 100644 --- a/include/assimp/Exporter.hpp +++ b/include/assimp/Exporter.hpp @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file Exporter.hpp * @brief Defines the CPP-API for the Assimp export interface */ +#pragma once #ifndef AI_EXPORT_HPP_INC #define AI_EXPORT_HPP_INC diff --git a/include/assimp/IOStream.hpp b/include/assimp/IOStream.hpp index 6cc231b3d..b0bc5ebb6 100644 --- a/include/assimp/IOStream.hpp +++ b/include/assimp/IOStream.hpp @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief File I/O wrappers for C++. */ +#pragma once #ifndef AI_IOSTREAM_H_INC #define AI_IOSTREAM_H_INC diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp index abd7e5837..9a5876edf 100644 --- a/include/assimp/IOSystem.hpp +++ b/include/assimp/IOSystem.hpp @@ -44,6 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * custom file handling logic to the Import library. */ +#pragma once #ifndef AI_IOSYSTEM_H_INC #define AI_IOSYSTEM_H_INC diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp index 4c01367ed..f7b8c00f3 100644 --- a/include/assimp/Importer.hpp +++ b/include/assimp/Importer.hpp @@ -42,12 +42,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file Importer.hpp * @brief Defines the C++-API to the Open Asset Import Library. */ -#ifndef INCLUDED_AI_ASSIMP_HPP -#define INCLUDED_AI_ASSIMP_HPP +#pragma once +#ifndef AI_ASSIMP_HPP_INC +#define AI_ASSIMP_HPP_INC #ifndef __cplusplus # error This header requires C++ to be used. Use assimp.h for plain C. -#endif +#endif // __cplusplus // Public ASSIMP data structures #include "types.h" @@ -658,4 +659,5 @@ AI_FORCE_INLINE bool Importer::IsExtensionSupported(const std::string& szExtensi } } // !namespace Assimp -#endif // INCLUDED_AI_ASSIMP_HPP + +#endif // AI_ASSIMP_HPP_INC diff --git a/include/assimp/ProgressHandler.hpp b/include/assimp/ProgressHandler.hpp index 8b069c82e..1ac016efb 100644 --- a/include/assimp/ProgressHandler.hpp +++ b/include/assimp/ProgressHandler.hpp @@ -41,9 +41,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file ProgressHandler.hpp * @brief Abstract base class 'ProgressHandler'. */ -#ifndef INCLUDED_AI_PROGRESSHANDLER_H -#define INCLUDED_AI_PROGRESSHANDLER_H +#pragma once +#ifndef AI_PROGRESSHANDLER_H_INC +#define AI_PROGRESSHANDLER_H_INC + #include "types.h" + namespace Assimp { // ------------------------------------------------------------------------------------ @@ -119,4 +122,4 @@ public: // ------------------------------------------------------------------------------------ } // Namespace Assimp -#endif +#endif // AI_PROGRESSHANDLER_H_INC diff --git a/include/assimp/ai_assert.h b/include/assimp/ai_assert.h index 0caeff673..fa63c329c 100644 --- a/include/assimp/ai_assert.h +++ b/include/assimp/ai_assert.h @@ -38,15 +38,15 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------- */ -#ifndef AI_DEBUG_H_INC -#define AI_DEBUG_H_INC +#pragma once +#ifndef AI_ASSERT_H_INC +#define AI_ASSERT_H_INC #ifdef ASSIMP_BUILD_DEBUG # include # define ai_assert(expression) assert(expression) #else # define ai_assert(expression) -#endif +#endif // - -#endif +#endif // AI_ASSERT_H_INC diff --git a/include/assimp/anim.h b/include/assimp/anim.h index af5941755..ea70cc170 100644 --- a/include/assimp/anim.h +++ b/include/assimp/anim.h @@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Defines the data structures in which the imported animations * are returned. */ +#pragma once #ifndef AI_ANIM_H_INC #define AI_ANIM_H_INC diff --git a/include/assimp/camera.h b/include/assimp/camera.h index 37f1bdaa0..6b9fbbea5 100644 --- a/include/assimp/camera.h +++ b/include/assimp/camera.h @@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Defines the aiCamera data structure */ +#pragma once #ifndef AI_CAMERA_H_INC #define AI_CAMERA_H_INC diff --git a/include/assimp/cexport.h b/include/assimp/cexport.h index 71cb1f8ec..17a491b8e 100644 --- a/include/assimp/cexport.h +++ b/include/assimp/cexport.h @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file cexport.h * @brief Defines the C-API for the Assimp export interface */ +#pragma once #ifndef AI_EXPORT_H_INC #define AI_EXPORT_H_INC diff --git a/include/assimp/cfileio.h b/include/assimp/cfileio.h index d91974b78..f9f121207 100644 --- a/include/assimp/cfileio.h +++ b/include/assimp/cfileio.h @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file cfileio.h * @brief Defines generic C routines to access memory-mapped files */ +#pragma once #ifndef AI_FILEIO_H_INC #define AI_FILEIO_H_INC diff --git a/include/assimp/cimport.h b/include/assimp/cimport.h index de0cbae30..ad06e669a 100644 --- a/include/assimp/cimport.h +++ b/include/assimp/cimport.h @@ -42,8 +42,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file cimport.h * @brief Defines the C-API to the Open Asset Import Library. */ +#pragma once #ifndef AI_ASSIMP_H_INC #define AI_ASSIMP_H_INC + #include "types.h" #include "importerdesc.h" diff --git a/include/assimp/color4.h b/include/assimp/color4.h index 6bcab45df..8371cdeeb 100644 --- a/include/assimp/color4.h +++ b/include/assimp/color4.h @@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file color4.h * @brief RGBA color structure, including operators when compiling in C++ */ +#pragma once #ifndef AI_COLOR4D_H_INC #define AI_COLOR4D_H_INC diff --git a/include/assimp/color4.inl b/include/assimp/color4.inl index d69814714..219372ef2 100644 --- a/include/assimp/color4.inl +++ b/include/assimp/color4.inl @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file color4.inl * @brief Inline implementation of aiColor4t operators */ +#pragma once #ifndef AI_COLOR4D_INL_INC #define AI_COLOR4D_INL_INC diff --git a/include/assimp/config.h b/include/assimp/config.h index 3db8a5697..842646b4d 100644 --- a/include/assimp/config.h +++ b/include/assimp/config.h @@ -55,8 +55,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * #aiSetImportPropertyFloat, * #aiSetImportPropertyString */ -#ifndef INCLUDED_AI_CONFIG_H -#define INCLUDED_AI_CONFIG_H +#pragma once +#ifndef AI_CONFIG_H_INC +#define AI_CONFIG_H_INC // ########################################################################### diff --git a/include/assimp/defs.h b/include/assimp/defs.h index 2c9749357..5cc431787 100644 --- a/include/assimp/defs.h +++ b/include/assimp/defs.h @@ -44,8 +44,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * blocks to find out how to customize _your_ Assimp build. */ -#ifndef INCLUDED_AI_DEFINES_H -#define INCLUDED_AI_DEFINES_H +#pragma once +#ifndef AI_DEFINES_H_INC +#define AI_DEFINES_H_INC ////////////////////////////////////////////////////////////////////////// /* Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific @@ -269,4 +270,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define AI_MAX_ALLOC(type) ((256U * 1024 * 1024) / sizeof(type)) -#endif // !! INCLUDED_AI_DEFINES_H +#endif // !! AI_DEFINES_H_INC diff --git a/include/assimp/importerdesc.h b/include/assimp/importerdesc.h index b2b123aca..455f83cce 100644 --- a/include/assimp/importerdesc.h +++ b/include/assimp/importerdesc.h @@ -42,8 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file importerdesc.h * @brief #aiImporterFlags, aiImporterDesc implementation. */ -#ifndef INCLUDED_AI_IMPORTER_DESC_H -#define INCLUDED_AI_IMPORTER_DESC_H +#pragma once +#ifndef AI_IMPORTER_DESC_H_INC +#define AI_IMPORTER_DESC_H_INC /** Mixed set of flags for #aiImporterDesc, indicating some features @@ -140,4 +141,4 @@ Will return a NULL-pointer if no assigned importer desc. was found for the given */ ASSIMP_API const C_STRUCT aiImporterDesc* aiGetImporterDesc( const char *extension ); -#endif +#endif // AI_IMPORTER_DESC_H_INC diff --git a/include/assimp/light.h b/include/assimp/light.h index 939d5b6cd..9a7893b52 100644 --- a/include/assimp/light.h +++ b/include/assimp/light.h @@ -43,8 +43,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Defines the aiLight data structure */ -#ifndef __AI_LIGHT_H_INC__ -#define __AI_LIGHT_H_INC__ +#pragma once +#ifndef AI_LIGHT_H_INC +#define AI_LIGHT_H_INC #include "types.h" @@ -250,7 +251,7 @@ struct aiLight #ifdef __cplusplus } -#endif +#endif -#endif // !! __AI_LIGHT_H_INC__ +#endif // !! AI_LIGHT_H_INC diff --git a/include/assimp/material.h b/include/assimp/material.h index 87d27c569..def0e819b 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file material.h * @brief Defines the material system of the library */ - +#pragma once #ifndef AI_MATERIAL_H_INC #define AI_MATERIAL_H_INC diff --git a/include/assimp/material.inl b/include/assimp/material.inl index 994e608b4..ef9c62f0d 100644 --- a/include/assimp/material.inl +++ b/include/assimp/material.inl @@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Defines the C++ getters for the material system */ +#pragma once #ifndef AI_MATERIAL_INL_INC #define AI_MATERIAL_INL_INC diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h index 725b1c34c..544d20b49 100644 --- a/include/assimp/matrix3x3.h +++ b/include/assimp/matrix3x3.h @@ -42,8 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file matrix3x3.h * @brief Definition of a 3x3 matrix, including operators when compiling in C++ */ -#ifndef AI_MATRIX3x3_H_INC -#define AI_MATRIX3x3_H_INC +#pragma once +#ifndef AI_MATRIX3X3_H_INC +#define AI_MATRIX3X3_H_INC #include "./Compiler/pushpack1.h" @@ -179,4 +180,4 @@ struct aiMatrix3x3 { #include "./Compiler/poppack1.h" -#endif // AI_MATRIX3x3_H_INC +#endif // AI_MATRIX3X3_H_INC diff --git a/include/assimp/matrix3x3.inl b/include/assimp/matrix3x3.inl index 9ace3f97b..2ef0141e8 100644 --- a/include/assimp/matrix3x3.inl +++ b/include/assimp/matrix3x3.inl @@ -42,8 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file matrix3x3.inl * @brief Inline implementation of the 3x3 matrix operators */ -#ifndef AI_MATRIX3x3_INL_INC -#define AI_MATRIX3x3_INL_INC +#pragma once +#ifndef AI_MATRIX3X3_INL_INC +#define AI_MATRIX3X3_INL_INC #ifdef __cplusplus #include "matrix3x3.h" @@ -333,4 +334,4 @@ inline aiMatrix3x3t& aiMatrix3x3t::FromToMatrix(const aiVector3t& aiMatrix4x4t::FromToMatrix(const aiVector3t @@ -246,6 +247,6 @@ struct aiMetadata }; -#endif // __AI_METADATA_H_INC__ +#endif // AI_METADATA_H_INC diff --git a/include/assimp/postprocess.h b/include/assimp/postprocess.h index 04de7a275..53c22da13 100644 --- a/include/assimp/postprocess.h +++ b/include/assimp/postprocess.h @@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file postprocess.h * @brief Definitions for import post processing steps */ +#pragma once #ifndef AI_POSTPROCESS_H_INC #define AI_POSTPROCESS_H_INC diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h index fe213f71e..edf442d62 100644 --- a/include/assimp/quaternion.h +++ b/include/assimp/quaternion.h @@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file quaternion.h * @brief Quaternion structure, including operators when compiling in C++ */ +#pragma once #ifndef AI_QUATERNION_H_INC #define AI_QUATERNION_H_INC @@ -122,5 +123,4 @@ struct aiQuaternion { #endif - #endif // AI_QUATERNION_H_INC diff --git a/include/assimp/quaternion.inl b/include/assimp/quaternion.inl index db27c25ff..68cb5a236 100644 --- a/include/assimp/quaternion.inl +++ b/include/assimp/quaternion.inl @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file quaternion.inl * @brief Inline implementation of aiQuaterniont operators */ +#pragma once #ifndef AI_QUATERNION_INL_INC #define AI_QUATERNION_INL_INC @@ -280,4 +281,4 @@ inline aiVector3t aiQuaterniont::Rotate (const aiVector3t& } #endif -#endif +#endif // AI_QUATERNION_INL_INC diff --git a/include/assimp/scene.h b/include/assimp/scene.h index 8987ac6a3..b3c56c7f1 100644 --- a/include/assimp/scene.h +++ b/include/assimp/scene.h @@ -38,12 +38,14 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------- */ +#pragma once /** @file scene.h * @brief Defines the data structures in which the imported scene is returned. */ -#ifndef __AI_SCENE_H_INC__ -#define __AI_SCENE_H_INC__ +#pragma once +#ifndef AI_SCENE_H_INC +#define AI_SCENE_H_INC #include "types.h" #include "texture.h" @@ -425,4 +427,4 @@ struct aiScene } //! namespace Assimp #endif -#endif // __AI_SCENE_H_INC__ +#endif // AI_SCENE_H_INC diff --git a/include/assimp/texture.h b/include/assimp/texture.h index ee3ee3149..b0fe695d4 100644 --- a/include/assimp/texture.h +++ b/include/assimp/texture.h @@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * pixels, and "compressed" textures, which are stored in a file format * such as PNG or TGA. */ - +#pragma once #ifndef AI_TEXTURE_H_INC #define AI_TEXTURE_H_INC diff --git a/include/assimp/types.h b/include/assimp/types.h index 592d5c64d..cdffce841 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file types.h * Basic data types and primitives, such as vectors or colors. */ +#pragma once #ifndef AI_TYPES_H_INC #define AI_TYPES_H_INC @@ -512,4 +513,5 @@ struct aiMemoryInfo #include "quaternion.inl" #include "matrix3x3.inl" #include "matrix4x4.inl" -#endif + +#endif // AI_TYPES_H_INC diff --git a/include/assimp/vector2.h b/include/assimp/vector2.h index 199743e26..a664cbecb 100644 --- a/include/assimp/vector2.h +++ b/include/assimp/vector2.h @@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file vector2.h * @brief 2D vector structure, including operators when compiling in C++ */ +#pragma once #ifndef AI_VECTOR2D_H_INC #define AI_VECTOR2D_H_INC diff --git a/include/assimp/vector2.inl b/include/assimp/vector2.inl index ae823fc1a..ce6521139 100644 --- a/include/assimp/vector2.inl +++ b/include/assimp/vector2.inl @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file vector2.inl * @brief Inline implementation of aiVector2t operators */ +#pragma once #ifndef AI_VECTOR2D_INL_INC #define AI_VECTOR2D_INL_INC @@ -221,4 +222,5 @@ inline aiVector2t operator - ( const aiVector2t& v) } #endif -#endif + +#endif // AI_VECTOR2D_INL_INC diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h index 84f785f8f..45571f84b 100644 --- a/include/assimp/vector3.h +++ b/include/assimp/vector3.h @@ -41,6 +41,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file vector3.h * @brief 3D vector structure, including operators when compiling in C++ */ +#pragma once #ifndef AI_VECTOR3D_H_INC #define AI_VECTOR3D_H_INC diff --git a/include/assimp/vector3.inl b/include/assimp/vector3.inl index 0d0d62968..22b5bca03 100644 --- a/include/assimp/vector3.inl +++ b/include/assimp/vector3.inl @@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** @file vector3.inl * @brief Inline implementation of aiVector3t operators */ +#pragma once #ifndef AI_VECTOR3D_INL_INC #define AI_VECTOR3D_INL_INC diff --git a/include/assimp/version.h b/include/assimp/version.h index 403798c1b..a9b2beb5b 100644 --- a/include/assimp/version.h +++ b/include/assimp/version.h @@ -43,8 +43,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * @brief Functions to query the version of the Assimp runtime, check * compile flags, ... */ -#ifndef INCLUDED_AI_VERSION_H -#define INCLUDED_AI_VERSION_H +#pragma once +#ifndef AI_VERSION_H_INC +#define AI_VERSION_H_INC #include "defs.h" @@ -102,4 +103,4 @@ ASSIMP_API unsigned int aiGetCompileFlags (void); } // end extern "C" #endif -#endif // !! #ifndef INCLUDED_AI_VERSION_H +#endif // !! #ifndef AI_VERSION_H_INC diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index df0139ddc..97af3f90a 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -85,6 +85,7 @@ SET( TEST_SRCS unit/utTextureTransform.cpp unit/utTriangulate.cpp unit/utVertexTriangleAdjacency.cpp + unit/utVersion.cpp ) SOURCE_GROUP( tests FILES ${TEST_SRCS} ) diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp new file mode 100644 index 000000000..d8953f866 --- /dev/null +++ b/test/unit/utVersion.cpp @@ -0,0 +1,69 @@ +/*------------------------------------------------------------------------- +Open Asset Import Library (assimp) +--------------------------------------------------------------------------- + +Copyright (c) 2006-2016, assimp team + +All rights reserved. + +Redistribution and use of this software in source and binary forms, +with or without modification, are permitted provided that the following +conditions are met: + +* Redistributions of source code must retain the above +copyright notice, this list of conditions and the +following disclaimer. + +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other +materials provided with the distribution. + +* Neither the name of the assimp team, nor the names of its +contributors may be used to endorse or promote products +derived from this software without specific prior +written permission of the assimp team. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------*/ +#include "UnitTestPCH.h" +#include + +class utVersion : public ::testing::Test { + // empty +}; + +TEST_F( utVersion, aiGetLegalStringTest ) { + const char *lv( aiGetLegalString() ); + EXPECT_NE( lv, nullptr ); + std::string text( lv ); + + size_t pos( text.find( std::string( "2016" ) ) ); + EXPECT_NE( pos, std::string::npos ); +} + +TEST_F( utVersion, aiGetVersionMinorTest ) { + EXPECT_EQ( aiGetVersionMinor(), 3 ); +} + +TEST_F( utVersion, aiGetVersionMajorTest ) { + EXPECT_EQ( aiGetVersionMajor(), 3 ); +} + +TEST_F( utVersion, aiGetCompileFlagsTest ) { + EXPECT_NE( aiGetCompileFlags(), 0 ); +} + +TEST_F( utVersion, aiGetVersionRevisionTest ) { + EXPECT_NE( aiGetVersionRevision(), 0 ); +}