- Added More Documentation

- Added some more notes to the planning doc regarding shared libraries
 - Started adding unit tests for the C++ lang library.
This commit is contained in:
Medusa Slockbower 2025-06-19 15:16:29 -04:00
parent 909be55ed3
commit 4d8466851c
21 changed files with 400 additions and 176 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.*/
/build/ /build/
/docs/ /docs/
/bin/ /bin/

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "external/sdl"]
path = external/sdl
url = https://github.com/libsdl-org/SDL.git

View File

@ -1,6 +1,12 @@
cmake_minimum_required(VERSION 3.30) cmake_minimum_required(VERSION 3.30)
project(fennec) project(fennec)
# External dependencies should be loaded here
# SDL is a dependency of the project, added as a git submodule
set(SDL_STATIC 1)
add_subdirectory(external/sdl)
set(CMAKE_CXX_STANDARD 26) set(CMAKE_CXX_STANDARD 26)
set(CMAKE_C_STANDARD 26) set(CMAKE_C_STANDARD 26)
@ -15,7 +21,8 @@ add_subdirectory(metaprogramming)
string(TOLOWER ${CMAKE_BUILD_TYPE} FENNEC_BUILD_NAME) string(TOLOWER ${CMAKE_BUILD_TYPE} FENNEC_BUILD_NAME)
set(CMAKE_BINARY_DIR ${PROJECT_SOURCE_DIR}/build/${CMAKE_PLATFORM_NO_VERSIONED_SONAME}) message(STATUS "OS: ${CMAKE_SYSTEM_NAME}")
message(STATUS "Build: ${FENNEC_BUILD_NAME}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME})
@ -32,7 +39,10 @@ add_library(fennec STATIC
include/fennec/containers/dynarray.h include/fennec/containers/dynarray.h
# LANG =================================================================================================================h # LANG =================================================================================================================
include/fennec/lang/lang.h
include/fennec/lang/metaprogramming.h
include/fennec/lang/bits.h include/fennec/lang/bits.h
include/fennec/lang/constants.h include/fennec/lang/constants.h
include/fennec/lang/conditional_types.h include/fennec/lang/conditional_types.h
@ -45,7 +55,9 @@ add_library(fennec STATIC
include/fennec/lang/types.h include/fennec/lang/types.h
include/fennec/lang/utility.h include/fennec/lang/utility.h
include/fennec/lang/type_sequences.h include/fennec/lang/type_sequences.h
include/fennec/lang/integer.h
include/fennec/lang/detail/__bits.h
include/fennec/lang/detail/__numeric_transforms.h include/fennec/lang/detail/__numeric_transforms.h
include/fennec/lang/detail/__type_traits.h include/fennec/lang/detail/__type_traits.h
include/fennec/lang/detail/__type_sequences.h include/fennec/lang/detail/__type_sequences.h
@ -86,16 +98,15 @@ add_library(fennec STATIC
include/fennec/math/detail/__fwd.h include/fennec/math/detail/__fwd.h
include/fennec/math/detail/__types.h include/fennec/math/detail/__types.h
include/fennec/math/detail/__vector_traits.h include/fennec/math/detail/__vector_traits.h
include/fennec/lang/lang.h include/fennec/lang/assert.h
include/fennec/lang/detail/__bits.h source/lang/assert.cpp
include/fennec/lang/integer.h
) )
# add metaprogramming templates as a dependency and also force documentation to be generated when fennec is compiled # add metaprogramming templates as a dependency and also force documentation to be generated when fennec is compiled
if(DOXYGEN_FOUND) if(DOXYGEN_FOUND)
add_dependencies(fennec fennecdocs metaprogramming) add_dependencies(fennec fennecdocs metaprogramming SDL3-static)
else() else()
add_dependencies(fennec metaprogramming) add_dependencies(fennec metaprogramming SDL3-static)
endif() endif()
# Compiler Warning Flags # Compiler Warning Flags

View File

@ -41,6 +41,15 @@ assertions. **DO NOT USE EXCEPTIONS**.
System implementations should be independent of architecture or platforms. i.e. the code of the graphics system should System implementations should be independent of architecture or platforms. i.e. the code of the graphics system should
not care if OpenGL or Vulkan is used and should not use any direct calls to OpenGL or Vulkan. not care if OpenGL or Vulkan is used and should not use any direct calls to OpenGL or Vulkan.
The engine should not care about the types of objects loaded from a so/dll. In fact, most of the code should
be type independent. Any shared information among a collection of objects should be held either implicitly or explicitly
in the super-class. It will be the responsibility of the linked code to initialize and cleanup the objects related to it.
This principle should extend to the submodules of the engine.
It is also best to avoid objects having behaviour that is not defined by the system they are in. There are some exceptions
in extensions or mods and should be given configurability and programmability within those systems and their stages.
This however can be acheived using events at different stages of those engines that are on-demand.
@ -68,6 +77,9 @@ So far this is implemented on an as-needed basis. A full implementation should b
Implement math functions according to the [OpenGL 4.6 Shading Language Specification](https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf). Implement math functions according to the [OpenGL 4.6 Shading Language Specification](https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.pdf).
"Extensions" has a different meaning here. Extensions for the math library are any functions that are not defined within
the Specification.
Additional extensions should be implemented to provide standard definitions for functions predominantly related Additional extensions should be implemented to provide standard definitions for functions predominantly related
to Linear Algebra, Mathematical Analysis, and Discrete Analysis. Additional extensions will be implemented on a to Linear Algebra, Mathematical Analysis, and Discrete Analysis. Additional extensions will be implemented on a
as-needed basis. as-needed basis.
@ -107,7 +119,6 @@ Here are essential data-structures not specified in the C++ stdlib:
## Format Processing (`fproc`) ## Format Processing (`fproc`)
No, this won't include Machine Learning, it will mostly include tools for processing human-readable files.
fennec should be able to use Doxygen and LaTeX externally. Consider including binaries with releases. fennec should be able to use Doxygen and LaTeX externally. Consider including binaries with releases.
* String Analysis (`fproc/strings`) * String Analysis (`fproc/strings`)
@ -167,6 +178,7 @@ This will be the core of the engine.
- Event System - Event System
- Most events will fire at the start of the next tick, especially those related to physics and input. - Most events will fire at the start of the next tick, especially those related to physics and input.
- Events for graphics or audio should propagate immediately. - Events for graphics or audio should propagate immediately.
- Events for stages should also propagate immediately, this is to support extensions and mods.
- Core Engine Loop - Core Engine Loop
- System Manager - System Manager
- Ticks vs. Frames - Ticks vs. Frames

1
external/sdl vendored Submodule

@ -0,0 +1 @@
Subproject commit d7939abf42de34fff409f5e7c4b77ace79dff4de

View File

@ -33,8 +33,7 @@
#define FENNEC_CONTAINERS_ARRAY_H #define FENNEC_CONTAINERS_ARRAY_H
#include <fennec/lang/types.h> #include <fennec/lang/types.h>
#include <fennec/lang/assert.h>
#include <cassert>
namespace fennec namespace fennec
{ {

View File

@ -0,0 +1,29 @@
// =====================================================================================================================
// fennec, a free and open source game engine
// Copyright © 2025 Medusa Slockbower
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// =====================================================================================================================
#ifndef FENNEC_LANG_ASSERT_H
#define FENNEC_LANG_ASSERT_H
using assert_handler = void (*)(const char *, const char *, int , const char *);
extern void set_assert_handler(assert_handler handler);
extern void __assert_impl(const char* expression, const char* file, int line, const char* function);
#define assert(expression) if(not(expression)) { __assert_impl(#expression, __FILE__, __LINE__, __PRETTY_FUNCTION__); }
#endif // FENNEC_LANG_ASSERT_H

View File

@ -73,7 +73,6 @@ namespace fennec
// fennec::conditional ================================================================================================= // fennec::conditional =================================================================================================
///
/// ///
/// \brief select between two types based on a condition /// \brief select between two types based on a condition
/// ///

View File

@ -18,7 +18,7 @@
/// ///
/// \file lang.h /// \file lang.h
/// \brief fennec C++ Language Library /// \brief \ref fennec_lang
/// ///
/// ///
/// \details /// \details
@ -31,6 +31,12 @@
#ifndef FENNEC_LANG_H #ifndef FENNEC_LANG_H
#define FENNEC_LANG_H #define FENNEC_LANG_H
#include <fennec/lang/bits.h>
#include <fennec/lang/intrinsics.h>
#include <fennec/lang/limits.h>
#include <fennec/lang/types.h>
#include <fennec/lang/utility.h>
/// ///
/// \page fennec_lang C++ Language Library /// \page fennec_lang C++ Language Library
/// ///
@ -45,21 +51,4 @@
/// ///
/// ///
///
/// \page fennec_lang_metaprogramming Metaprogramming
///
/// Metaprogramming is a method of obtaining information about the structure of the code at compile time.
/// This includes getting traits of types, such as with \ref fennec::numeric_limits. You may even
/// \ref fennec_lang_conditional_types "programmatically enable" functions based on the info of the types that the function uses.
///
/// - \subpage fennec_lang_constants
/// - \subpage fennec_lang_conditional_types
/// - \subpage fennec_lang_numeric_transforms
/// - \subpage fennec_lang_sequences
/// - \subpage fennec_lang_type_sequences
/// - \subpage fennec_lang_type_traits
/// - \subpage fennec_lang_type_transforms
///
///
#endif // FENNEC_LANG_H #endif // FENNEC_LANG_H

View File

@ -0,0 +1,52 @@
// =====================================================================================================================
// fennec, a free and open source game engine
// Copyright © 2025 Medusa Slockbower
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// =====================================================================================================================
///
/// \file metaprogramming.h
/// \brief \ref fennec_lang
///
///
/// \details
/// \author Medusa Slockbower
///
/// \copyright Copyright © 2025 Medusa Slockbower ([GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html))
///
///
#ifndef FENNEC_LANG_METAPROGRAMMING_H
#define FENNEC_LANG_METAPROGRAMMING_H
///
/// \page fennec_lang_metaprogramming Metaprogramming Library
///
/// This is a sub-library of the fennec \ref fennec_lang. Metaprogramming is a method of obtaining information about the
/// structure of the code and changing its behaviour at compile time. This includes getting traits of types, such as with
/// \ref fennec::is_signed. You may even \ref fennec_lang_conditional_types "programmatically enable" functions
/// based on the info of the types that the function uses.
///
/// - \subpage fennec_lang_constants
/// - \subpage fennec_lang_conditional_types
/// - \subpage fennec_lang_numeric_transforms
/// - \subpage fennec_lang_sequences
/// - \subpage fennec_lang_type_sequences
/// - \subpage fennec_lang_type_traits
/// - \subpage fennec_lang_type_transforms
///
///
#endif // FENNEC_LANG_METAPROGRAMMING_H

View File

@ -219,7 +219,6 @@
namespace fennec namespace fennec
{ {
// Basic Types ========================================================================================================= // Basic Types =========================================================================================================
/// ///
@ -285,71 +284,6 @@ using double_t = double;
// Sized Arithmetic Types ==============================================================================================
///
/// \name Sized Integer Types
/// @{
///
/// \brief Signed 8-bit integer
using int8_t = schar_t;
///
/// \brief Signed 16-bit integer
using int16_t = short_t;
///
/// \brief Signed 32-bit integer
using int32_t = long_t;
///
/// \brief Signed signed 64-bit integer
using int64_t = llong_t;
/// @}
///
/// \name Sized Unsigned Integer Types
/// @{
///
/// \brief Unsigned 8-bit integer
using uint8_t = uchar_t;
///
/// \brief Unsigned 16-bit integer
using uint16_t = ushort_t;
///
/// \brief Unsigned 32-bit integer
using uint32_t = ulong_t;
///
/// \brief Unsigned 64-bit integer
using uint64_t = ullong_t;
/// @}
///
/// \name Sized Floating-Point Types
/// @{
///
/// \brief A single-precision floating-point scalar
using float32_t = float_t;
///
/// \brief A double-precision floating-point scalar
using float64_t = double_t;
/// @}
/// ///
/// \name Special Types /// \name Special Types
/// @{ /// @{
@ -392,6 +326,75 @@ template<typename...>
using void_t = void; using void_t = void;
/// @} /// @}
}
#include <fennec/lang/conditional_types.h>
namespace fennec
{
// Sized Arithmetic Types ==============================================================================================
///
/// \name Sized Integer Types
/// @{
///
/// \brief Signed 8-bit integer
using int8_t = schar_t;
///
/// \brief Signed 16-bit integer
using int16_t = short_t;
///
/// \brief Signed 32-bit integer
using int32_t = conditional_t<sizeof(int_t) == 4, int_t, long_t>;
///
/// \brief Signed signed 64-bit integer
using int64_t = llong_t;
/// @}
///
/// \name Sized Unsigned Integer Types
/// @{
///
/// \brief Unsigned 8-bit integer
using uint8_t = uchar_t;
///
/// \brief Unsigned 16-bit integer
using uint16_t = ushort_t;
///
/// \brief Unsigned 32-bit integer
using uint32_t = conditional_t<sizeof(uint_t) == 4, uint_t, ulong_t>;
///
/// \brief Unsigned 64-bit integer
using uint64_t = ullong_t;
/// @}
///
/// \name Sized Floating-Point Types
/// @{
///
/// \brief A single-precision floating-point scalar
using float32_t = float_t;
///
/// \brief A double-precision floating-point scalar
using float64_t = double_t;
/// @}
} }

36
source/lang/assert.cpp Normal file
View File

@ -0,0 +1,36 @@
// =====================================================================================================================
// fennec, a free and open source game engine
// Copyright © 2025 Medusa Slockbower
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// =====================================================================================================================
#include <stdlib.h>
using assert_handler = void (*)(const char *, const char *, int , const char *);
static assert_handler __priv_handler = nullptr;
void set_assert_handler(assert_handler handler)
{
__priv_handler = handler;
}
void __assert_impl(const char* expression, const char* file, int line, const char* function)
{
if (__priv_handler)
__priv_handler(expression, file, line, function);
abort();
}

12
test.sh
View File

@ -41,7 +41,8 @@ Debug()
cd ./build/debug cd ./build/debug
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -S ../.. -B . cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -S ../.. -B .
cmake --build . --target fennec-test cmake --build . --target fennec-test
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt ./test/fennec-test cd ../../bin/debug/
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt fennec-test
cd ../.. cd ../..
} }
@ -51,7 +52,8 @@ Release()
cd ./build/release cd ./build/release
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -S ../.. -B . cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -S ../.. -B .
cmake --build . --target fennec-test cmake --build . --target fennec-test
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt ./test/fennec-test cd ../../bin/release/
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt fennec-test
cd ../.. cd ../..
} }
@ -61,7 +63,8 @@ RelWithDebInfo()
cd ./build/relwithdebinfo cd ./build/relwithdebinfo
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -S ../.. -B . cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -S ../.. -B .
cmake --build . --target fennec-test cmake --build . --target fennec-test
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt ./test/fennec-test cd ../../bin/relwithdebinfo/
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt fennec-test
cd ../.. cd ../..
} }
@ -71,7 +74,8 @@ MinSizeRel()
cd ./build/minsizerel cd ./build/minsizerel
cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -S ../.. -B . cmake -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -S ../.. -B .
cmake --build . --target fennec-test cmake --build . --target fennec-test
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt ./test/fennec-test cd ../../bin/minsizerel/
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt fennec-test
cd ../.. cd ../..
} }

View File

@ -12,7 +12,8 @@ add_executable(fennec-test main.cpp
tests/test_memory.h tests/test_memory.h
tests/test_math.h tests/test_math.h
tests/test_lang.h tests/test_lang.h
tests/lang/conditional_types.h tests/lang/test_conditional_types.h
tests/lang/test_bits.h
) )
target_link_libraries(fennec-test PRIVATE target_link_libraries(fennec-test PRIVATE

View File

@ -31,6 +31,11 @@ int main(int, char **)
fennec_test_spacer(2); fennec_test_spacer(2);
fennec_test_header("c++ language library");
fennec_test_spacer(2);
fennec::test::fennec_test_lang();
fennec_test_spacer(3);
fennec_test_header("math library"); fennec_test_header("math library");
fennec_test_spacer(2); fennec_test_spacer(2);
fennec::test::fennec_test_math(); fennec::test::fennec_test_math();

View File

@ -22,7 +22,6 @@
#include <iostream> #include <iostream>
#include <ostream> #include <ostream>
#include <string> #include <string>
#include <cassert>
#include <fennec/lang/limits.h> #include <fennec/lang/limits.h>
#include <fennec/math/common.h> #include <fennec/math/common.h>
@ -68,7 +67,7 @@ inline bool operator<=(const vector<ScalarT, IndicesV...>& lhs, const vector<Sca
} }
template<typename ResultT> template<typename ResultT>
inline void __fennec_test_run(const std::string& expression, ResultT result, ResultT expected) inline void __fennec_test_run(const std::string& expression, const ResultT result, const ResultT expected)
{ {
std::cout << std::boolalpha; std::cout << std::boolalpha;
std::cout << '\t' << expression << " = " << result; std::cout << '\t' << expression << " = " << result;

View File

@ -0,0 +1,49 @@
// =====================================================================================================================
// fennec, a free and open source game engine
// Copyright © 2025 Medusa Slockbower
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// =====================================================================================================================
#ifndef FENNEC_TEST_LANG_BITS_H
#define FENNEC_TEST_LANG_BITS_H
#include <fennec/lang/assert.h>
#include <fennec/lang/bits.h>
#include "../../test.h"
namespace fennec
{
namespace test
{
void fennec_test_lang_bits()
{
int a = 0x48ef13ad;
int b = 0x23e5ab9c;
fennec_test_run(fennec::bit_cast<float>(0x3ee00000), 0.4375f);
fennec_test_run(*static_cast<int*>(fennec::bit_and(&a, &b, sizeof(int))), 0x48ef13ad & 0x23e5ab9c);
fennec_test_run(*static_cast<int*>(fennec::bit_or(&a, &b, sizeof(int))), (0x48ef13ad & 0x23e5ab9c) | 0x23e5ab9c);
fennec_test_run(*static_cast<int*>(fennec::bit_xor(&a, &b, sizeof(int))), ((0x48ef13ad & 0x23e5ab9c) | 0x23e5ab9c) ^ 0x23e5ab9c);
}
}
}
#endif // FENNEC_TEST_LANG_BITS_H

View File

@ -19,6 +19,19 @@
#ifndef FENNEC_TEST_LANG_CONDITIONAL_TYPES_H #ifndef FENNEC_TEST_LANG_CONDITIONAL_TYPES_H
#define FENNEC_TEST_LANG_CONDITIONAL_TYPES_H #define FENNEC_TEST_LANG_CONDITIONAL_TYPES_H
namespace fennec
{
namespace test
{
inline void fennec_test_lang_conditional_types()
{
}
}
}
#endif // FENNEC_TEST_LANG_CONDITIONAL_TYPES_H #endif // FENNEC_TEST_LANG_CONDITIONAL_TYPES_H

View File

@ -33,8 +33,6 @@ namespace test
inline void fennec_test_math_geometric() inline void fennec_test_math_geometric()
{ {
/*
fennec_test_spacer(1);
fennec_test_run(fennec::dot(vec2(1, 2), vec2(1, 2)), 5.0f); fennec_test_run(fennec::dot(vec2(1, 2), vec2(1, 2)), 5.0f);
fennec_test_run(fennec::dot(vec3(1, 2, 3), vec3(1, 2, 3)), 14.0f); fennec_test_run(fennec::dot(vec3(1, 2, 3), vec3(1, 2, 3)), 14.0f);
@ -69,7 +67,7 @@ inline void fennec_test_math_geometric()
fennec_test_run(fennec::normalize(vec2(1, 1)), vec2(sqrt(2.0f) / 2.0f, sqrt(2.0f) / 2.0f)); fennec_test_run(fennec::normalize(vec2(1, 1)), vec2(sqrt(2.0f) / 2.0f, sqrt(2.0f) / 2.0f));
fennec_test_run(fennec::normalize(vec3(1, 1, 1)), vec3(sqrt(3.0f) / 3.0f, sqrt(3.0f) / 3.0f, sqrt(3.0f) / 3.0f)); fennec_test_run(fennec::normalize(vec3(1, 1, 1)), vec3(sqrt(3.0f) / 3.0f, sqrt(3.0f) / 3.0f, sqrt(3.0f) / 3.0f));
fennec_test_run(fennec::normalize(vec4(1, 1, 1, 1)), vec4(0.5f, 0.5f, 0.5f, 0.5f)); fennec_test_run(fennec::normalize(vec4(1, 1, 1, 1)), vec4(0.5f, 0.5f, 0.5f, 0.5f));
*/
} }
} }

View File

@ -19,4 +19,25 @@
#ifndef FENNEC_TEST_LANG_H #ifndef FENNEC_TEST_LANG_H
#define FENNEC_TEST_LANG_H #define FENNEC_TEST_LANG_H
#include "lang/test_bits.h"
#include "lang/test_conditional_types.h"
namespace fennec
{
namespace test
{
inline void fennec_test_lang()
{
fennec_test_subheader("bit tests");
fennec_test_spacer(2);
fennec_test_lang_bits();
fennec_test_spacer(3);
}
}
}
#endif // FENNEC_TEST_LANG_H #endif // FENNEC_TEST_LANG_H

View File

@ -32,7 +32,6 @@ namespace test
inline void fennec_test_math() inline void fennec_test_math()
{ {
fennec_test_subheader("scalar tests"); fennec_test_subheader("scalar tests");
fennec_test_spacer(2); fennec_test_spacer(2);
fennec_test_math_scalar(); fennec_test_math_scalar();