mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-12 05:58:15 -04:00
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
//=======================================================================
|
|
// Copyright Baptiste Wicht 2013-2016.
|
|
// Distributed under the terms of the MIT License.
|
|
// (See accompanying file LICENSE or copy at
|
|
// http://www.opensource.org/licenses/MIT)
|
|
//=======================================================================
|
|
|
|
#include <cstdio>
|
|
#include <cstring>
|
|
|
|
#include "test.hpp"
|
|
|
|
void string_tests();
|
|
void tuple_tests();
|
|
void vector_tests();
|
|
void list_tests();
|
|
void traits_tests();
|
|
void algorithms_tests();
|
|
void circular_buffer_tests();
|
|
|
|
int main(){
|
|
string_tests();
|
|
traits_tests();
|
|
algorithms_tests();
|
|
circular_buffer_tests();
|
|
tuple_tests();
|
|
vector_tests();
|
|
list_tests();
|
|
|
|
printf("All tests finished\n");
|
|
|
|
return 0;
|
|
}
|
|
|
|
void check(bool condition){
|
|
if(!condition){
|
|
printf("Check failed\n");
|
|
}
|
|
}
|
|
|
|
void check(bool condition, const char* message){
|
|
if(!condition){
|
|
printf("Check failed: \"%s\"\n", message);
|
|
}
|
|
}
|
|
|
|
void check_equals(long value, long expected, const char* message){
|
|
if(value != expected){
|
|
printf("Check failed: \"%s\"\n", message);
|
|
printf("\t expected: %ld was: %ld\n", expected, value);
|
|
}
|
|
}
|