mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-13 14:36:37 -04:00
New TSTL tests
This commit is contained in:
parent
e9a3b78a9c
commit
c510b6fa89
@ -36,10 +36,25 @@ void test_has_trivial_assign(){
|
||||
check(!std::has_trivial_assign<std::string>::value, "Invalid has_trivial_assign");
|
||||
}
|
||||
|
||||
struct non_trivial {
|
||||
int a;
|
||||
~non_trivial(){
|
||||
a = 9;
|
||||
}
|
||||
};
|
||||
|
||||
void test_is_trivially_destructible(){
|
||||
check(std::is_trivially_destructible<char>::value, "Invalid is_trivially_destructible<char>");
|
||||
check(std::is_trivially_destructible<long unsigned int>::value, "Invalid is_trivially_destructible<long unsigned int>");
|
||||
check(std::is_trivially_destructible<void>::value, "Invalid is_trivially_destructible<void>");
|
||||
check(!std::is_trivially_destructible<non_trivial>::value, "Invalid is_trivially_destructible<non_trivial>");
|
||||
}
|
||||
|
||||
} //end of anonymous namespace
|
||||
|
||||
void traits_tests(){
|
||||
test_is_same();
|
||||
test_iterator_traits();
|
||||
test_has_trivial_assign();
|
||||
test_is_trivially_destructible();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user