- Adjusted Formatting of tests
- Finished map implementation and unit tests TODO: Threading
This commit is contained in:
@@ -23,33 +23,28 @@
|
||||
|
||||
#include <fennec/containers/dynarray.h>
|
||||
|
||||
namespace fennec
|
||||
namespace fennec::test
|
||||
{
|
||||
|
||||
namespace test
|
||||
{
|
||||
inline void fennec_test_containers_dynarray() {
|
||||
|
||||
inline void fennec_test_containers_dynarray() {
|
||||
dynarray<int> test1;
|
||||
dynarray<int> test2;
|
||||
|
||||
dynarray<int> test1;
|
||||
dynarray<int> test2;
|
||||
int n = 10000;
|
||||
test1.resize(n); test2.resize(n);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
test1.push_back(i);
|
||||
test2.push_back(n - i - 1);
|
||||
}
|
||||
|
||||
int n = 10000;
|
||||
test1.resize(n); test2.resize(n);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
test1.push_back(i);
|
||||
test2.push_back(n - i - 1);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
assertf(test1[i] == test2[n - i - 1], "Failed dynarray::push_back");
|
||||
}
|
||||
|
||||
std::cout << "passed" << std::endl;
|
||||
}
|
||||
|
||||
for (int i = 0; i < n; ++i) {
|
||||
assertf(test1[i] == test2[n - i - 1], "Failed dynarray::push_back");
|
||||
}
|
||||
|
||||
std::cout << "passed" << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // FENNEC_TEST_CONTAINERS_DYNARRAY_H
|
||||
|
||||
Reference in New Issue
Block a user