xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
utils.cc
浏览该文件的文档.
1#include <gtest/gtest.h>
2
5
6using namespace std;
7using namespace xcmath;
8TEST(Compiling, get_type_name) {
9 EXPECT_STREQ(TypeName<int>, "int");
10 EXPECT_STREQ(TypeName<double>, "double");
11 EXPECT_STREQ(TypeName<float>, "float");
12}
13
14TEST(Compiling, tvector) {
17 using number = integer::concat<floating>::push_back<bool>;
18 using int1 = integer::pop_back;
19 using int2 = integer::pop_front;
20 using int43 = integer::remove_all<>;
21 using int44 = integer::remove_all<int, short>;
22 using int45 = integer::remove_all_from_list<tvector<>>;
23 using int46 = integer::remove_all_from_list<tvector<int>>;
24 using int47 = integer::remove_all_from_list<tvector<int, long>>;
27 EXPECT_FALSE(tvector<>::has<int>);
28 EXPECT_FALSE(tvector<>::has<double>);
29 EXPECT_EQ(tvector<int>::size, 1);
30 EXPECT_EQ((tvector<int, double>::size), 2);
32 EXPECT_EQ(t1::size, 2);
33 EXPECT_EQ(t2::size, 2);
34}
Compiler-specific type information handling for MSVC
Definition complex.hpp:12
std::remove_pointer< decltype([]< size_t... I >(std::index_sequence< I... >) { return(tvector< at< Start+I >... > *) nullptr slice
Definition types.hpp:96
std::remove_pointer< decltype([]< size_t... I, size_t... J >(std::index_sequence< I... >, std::index_sequence< J... >) { return(tvector< at< I >..., at< J+T+1 >... > *) nullptr remove
Definition types.hpp:69
TEST(Compiling, get_type_name)
Definition utils.cc:8