- Adjusted Formatting of tests

- Finished map implementation and unit tests

 TODO: Threading
This commit is contained in:
2025-07-23 12:05:02 -04:00
parent 73333b4c67
commit 5ab2952e83
63 changed files with 2703 additions and 2187 deletions

View File

@@ -25,34 +25,29 @@
#include <unordered_set>
#include <fennec/containers/set.h>
namespace fennec
namespace fennec::test
{
namespace test
{
inline void fennec_test_containers_set() {
inline void fennec_test_containers_set() {
using type_t = decltype(rand());
std::unordered_set<type_t> ref;
set<type_t> test;
using type_t = decltype(rand());
std::unordered_set<type_t> ref;
set<type_t> test;
srand(0);
for (int i = 0; i < 10000; ++i) {
type_t v = rand();
ref.insert(v);
test.insert(v);
}
srand(0);
for (int i = 0; i < 10000; ++i) {
type_t v = rand();
ref.insert(v);
test.insert(v);
for (int i = 0; i < 10000; ++i) {
assertf(ref.contains(i) == test.contains(i), "set test failed");
}
std::cout << "passed" << std::endl;
}
for (int i = 0; i < 10000; ++i) {
assertf(ref.contains(i) == test.contains(i), "set test failed");
}
std::cout << "passed" << std::endl;
}
}
}
#endif // FENNEC_TEST_CONTAINERS_SET_H