Change namespace name so it's a lot less verbose.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "../src/ConstString.hpp"
|
||||
|
||||
TEST_CASE("Use const string in unordered_map", "[Utilities]") {
|
||||
std::unordered_map<Arbutils::ConstString, int32_t> map;
|
||||
std::unordered_map<ArbUt::ConstString, int32_t> map;
|
||||
map.insert({"foo"_c, 1});
|
||||
map.insert({"bar"_c, 5});
|
||||
|
||||
@@ -14,7 +14,7 @@ TEST_CASE("Use const string in unordered_map", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Use const string in switch case", "[Utilities]") {
|
||||
auto val = Arbutils::ConstString("foobar");
|
||||
auto val = ArbUt::ConstString("foobar");
|
||||
switch (val) {
|
||||
case "foo"_c: FAIL(); break;
|
||||
case "bar"_c: FAIL(); break;
|
||||
@@ -24,7 +24,7 @@ TEST_CASE("Use const string in switch case", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Use insensitive const string in unordered_map", "[Utilities]") {
|
||||
std::unordered_map<Arbutils::CaseInsensitiveConstString, int32_t> map;
|
||||
std::unordered_map<ArbUt::CaseInsensitiveConstString, int32_t> map;
|
||||
map.insert({"foO"_cnc, 1});
|
||||
map.insert({"bAR"_cnc, 5});
|
||||
|
||||
@@ -33,7 +33,7 @@ TEST_CASE("Use insensitive const string in unordered_map", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Use case insensitive const string in switch case", "[Utilities]") {
|
||||
auto val = Arbutils::CaseInsensitiveConstString("foobar");
|
||||
auto val = ArbUt::CaseInsensitiveConstString("foobar");
|
||||
switch (val) {
|
||||
case "foo"_cnc: FAIL(); break;
|
||||
case "bar"_cnc: FAIL(); break;
|
||||
@@ -45,7 +45,7 @@ TEST_CASE("Use case insensitive const string in switch case", "[Utilities]") {
|
||||
#ifndef WINDOWS
|
||||
__attribute__((optnone))
|
||||
#endif
|
||||
static Arbutils::CaseInsensitiveConstString
|
||||
static ArbUt::CaseInsensitiveConstString
|
||||
TestCreateConstString() {
|
||||
char originalVal[7];
|
||||
originalVal[0] = 'f';
|
||||
@@ -55,17 +55,17 @@ TestCreateConstString() {
|
||||
originalVal[4] = 'a';
|
||||
originalVal[5] = 'r';
|
||||
originalVal[6] = '\0';
|
||||
return Arbutils::CaseInsensitiveConstString(originalVal);
|
||||
return ArbUt::CaseInsensitiveConstString(originalVal);
|
||||
}
|
||||
|
||||
TEST_CASE("Out of scope char* doesn't lose reference", "[Utilities]") {
|
||||
Arbutils::CaseInsensitiveConstString val = TestCreateConstString();
|
||||
ArbUt::CaseInsensitiveConstString val = TestCreateConstString();
|
||||
INFO(val.c_str());
|
||||
REQUIRE(strcmp(val.c_str(), "foobar") == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("Literal conststring to non literal, then use", "[Utilities]") {
|
||||
Arbutils::CaseInsensitiveConstString val;
|
||||
ArbUt::CaseInsensitiveConstString val;
|
||||
{ val = "foobar"_cnc; }
|
||||
INFO(val.c_str());
|
||||
REQUIRE(strcmp(val.c_str(), "foobar") == 0);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../extern/catch.hpp"
|
||||
#include "../src/Collections/Dictionary.hpp"
|
||||
using namespace Arbutils::Collections;
|
||||
using namespace ArbUt::Collections;
|
||||
|
||||
TEST_CASE("Create Dictionary, insert values", "[Utilities]") {
|
||||
auto dic = Dictionary<int, int>(5);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifdef TESTS_BUILD
|
||||
#include "../extern/catch.hpp"
|
||||
#include "../src/Collections/List.hpp"
|
||||
using namespace Arbutils::Collections;
|
||||
using namespace ArbUt::Collections;
|
||||
|
||||
TEST_CASE("Create List, insert values", "[Utilities]") {
|
||||
auto ls = List<int>();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "../src/Random.hpp"
|
||||
|
||||
TEST_CASE("Random ints", "[Utilities]") {
|
||||
auto rand = Arbutils::Random(10);
|
||||
auto rand = ArbUt::Random(10);
|
||||
CHECK(rand.Get() == 1234817989);
|
||||
CHECK(rand.Get() == 1171957426);
|
||||
CHECK(rand.Get() == 275100647);
|
||||
@@ -19,7 +19,7 @@ TEST_CASE("Random ints", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Random ints with limit", "[Utilities]") {
|
||||
auto rand = Arbutils::Random(10);
|
||||
auto rand = ArbUt::Random(10);
|
||||
CHECK(rand.Get(10) == 2);
|
||||
CHECK(rand.Get(10) == 2);
|
||||
CHECK(rand.Get(10) == 0);
|
||||
@@ -43,7 +43,7 @@ TEST_CASE("Random ints with limit", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Random ints with upper and bottom", "[Utilities]") {
|
||||
auto rand = Arbutils::Random(10);
|
||||
auto rand = ArbUt::Random(10);
|
||||
CHECK(rand.Get(10, 30) == 15);
|
||||
CHECK(rand.Get(10, 30) == 15);
|
||||
CHECK(rand.Get(10, 30) == 11);
|
||||
@@ -57,7 +57,7 @@ TEST_CASE("Random ints with upper and bottom", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Random distribution (max 0, min 1)", "[Utilities]") {
|
||||
auto rand = Arbutils::Random(10);
|
||||
auto rand = ArbUt::Random(10);
|
||||
const int size = 100000;
|
||||
int arr[size];
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
@@ -70,7 +70,7 @@ TEST_CASE("Random distribution (max 0, min 1)", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Random distribution (max 0, min 2)", "[Utilities]") {
|
||||
auto rand = Arbutils::Random(10);
|
||||
auto rand = ArbUt::Random(10);
|
||||
const int size = 100000;
|
||||
int arr[size];
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
@@ -92,7 +92,7 @@ TEST_CASE("Random distribution (max 0, min 2)", "[Utilities]") {
|
||||
}
|
||||
|
||||
TEST_CASE("Random distribution (max 0, min 3)", "[Utilities]") {
|
||||
auto rand = Arbutils::Random(10);
|
||||
auto rand = ArbUt::Random(10);
|
||||
const size_t size = 100000;
|
||||
int arr[size];
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
|
||||
Reference in New Issue
Block a user