mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Added test for GCC
This commit is contained in:
parent
89d77b51c6
commit
09372b3d43
@ -36,6 +36,23 @@ int test_aligned()
|
|||||||
size_t align64_aligned = alignof(glm::detail::storage<int, 64, true>::type);
|
size_t align64_aligned = alignof(glm::detail::storage<int, 64, true>::type);
|
||||||
Error += align64_aligned == 64 ? 0 : 1;
|
Error += align64_aligned == 64 ? 0 : 1;
|
||||||
|
|
||||||
|
# elif GLM_COMPILER & GLM_COMPILER_GCC
|
||||||
|
|
||||||
|
size_t align1_aligned = __alignof__(glm::detail::storage<int, 1, true>::type);
|
||||||
|
Error += align1_aligned == 1 ? 0 : 1;
|
||||||
|
size_t align2_aligned = __alignof__(glm::detail::storage<int, 2, true>::type);
|
||||||
|
Error += align2_aligned == 2 ? 0 : 1;
|
||||||
|
size_t align4_aligned = __alignof__(glm::detail::storage<int, 4, true>::type);
|
||||||
|
Error += align4_aligned == 4 ? 0 : 1;
|
||||||
|
size_t align8_aligned = __alignof__(glm::detail::storage<int, 8, true>::type);
|
||||||
|
Error += align8_aligned == 8 ? 0 : 1;
|
||||||
|
size_t align16_aligned = __alignof__(glm::detail::storage<int, 16, true>::type);
|
||||||
|
Error += align16_aligned == 16 ? 0 : 1;
|
||||||
|
size_t align32_aligned = __alignof__(glm::detail::storage<int, 32, true>::type);
|
||||||
|
Error += align32_aligned == 32 ? 0 : 1;
|
||||||
|
size_t align64_aligned = __alignof__(glm::detail::storage<int, 64, true>::type);
|
||||||
|
Error += align64_aligned == 64 ? 0 : 1;
|
||||||
|
|
||||||
# endif //GLM_HAS_ALIGNOF
|
# endif //GLM_HAS_ALIGNOF
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
@ -77,6 +94,23 @@ int test_unaligned()
|
|||||||
size_t align64_unaligned = alignof(glm::detail::storage<int, 64, false>::type);
|
size_t align64_unaligned = alignof(glm::detail::storage<int, 64, false>::type);
|
||||||
Error += align64_unaligned == 1 ? 0 : 1;
|
Error += align64_unaligned == 1 ? 0 : 1;
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
|
size_t align1_unaligned = __alignof__(glm::detail::storage<int, 1, false>::type);
|
||||||
|
Error += align1_unaligned == 1 ? 0 : 1;
|
||||||
|
size_t align2_unaligned = __alignof__(glm::detail::storage<int, 2, false>::type);
|
||||||
|
Error += align2_unaligned == 1 ? 0 : 1;
|
||||||
|
size_t align4_unaligned = __alignof__(glm::detail::storage<int, 4, false>::type);
|
||||||
|
Error += align4_unaligned == 1 ? 0 : 1;
|
||||||
|
size_t align8_unaligned = __alignof__(glm::detail::storage<int, 8, false>::type);
|
||||||
|
Error += align8_unaligned == 1 ? 0 : 1;
|
||||||
|
size_t align16_unaligned = __alignof__(glm::detail::storage<int, 16, false>::type);
|
||||||
|
Error += align16_unaligned == 1 ? 0 : 1;
|
||||||
|
size_t align32_unaligned = __alignof__(glm::detail::storage<int, 32, false>::type);
|
||||||
|
Error += align32_unaligned == 1 ? 0 : 1;
|
||||||
|
size_t align64_unaligned = __alignof__(glm::detail::storage<int, 64, false>::type);
|
||||||
|
Error += align64_unaligned == 1 ? 0 : 1;
|
||||||
|
|
||||||
# endif //GLM_HAS_ALIGNOF
|
# endif //GLM_HAS_ALIGNOF
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
|
Loading…
Reference in New Issue
Block a user