Skip to content

Commit

Permalink
everywhere: Prefer string test id.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Apr 14, 2024
1 parent 6aef3e7 commit 654a19b
Show file tree
Hide file tree
Showing 26 changed files with 80 additions and 80 deletions.
12 changes: 6 additions & 6 deletions src/libs/karm-base/tests/test-async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(testSenderOne) {
test$("sender-one") {
auto sender = Async::One<int>{10};
auto res = Async::run(sender);
expectEq$(res, 10);
Expand All @@ -14,7 +14,7 @@ Async::_Task<int> taskValue() {
co_return 42;
}

test$(testTaskValue) {
test$("task-value") {
auto res = Async::run(taskValue());
expectEq$(res, 42);
return Ok();
Expand All @@ -24,13 +24,13 @@ Async::_Task<int> taskOuter() {
co_return co_await taskValue();
}

test$(testTaskOuter) {
test$("task-outer") {
auto res = Async::run(taskOuter());
expectEq$(res, 42);
return Ok();
}

test$(testTaskDetach) {
test$("task-detach") {
int res = 0xdead;
Async::detach(taskValue(), [&](int r) {
res = r;
Expand All @@ -39,7 +39,7 @@ test$(testTaskDetach) {
return Ok();
}

test$(testPromiseOneFuture) {
test$("promise-one-future") {
Opt<Async::_Future<int>> future;
{
Async::_Promise<int> promise;
Expand All @@ -51,7 +51,7 @@ test$(testPromiseOneFuture) {
return Ok();
}

test$(testPromiseMultipleFutures) {
test$("promise-multiple-futures") {
Opt<Async::_Future<int>> f1, f2, f3;
{
Async::_Promise<int> promise;
Expand Down
18 changes: 9 additions & 9 deletions src/libs/karm-base/tests/test-list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(listPushAndPop) {
test$("list-push-and-pop") {
List<int> list;

list.pushBack(1);
Expand All @@ -23,7 +23,7 @@ test$(listPushAndPop) {
return Ok();
}

test$(listRequeue) {
test$("list-requeue") {
List<int> list;

list.pushBack(1);
Expand All @@ -45,7 +45,7 @@ test$(listRequeue) {
return Ok();
}

test$(listTrunc) {
test$("list-trunc") {
List<int> list;

list.pushBack(1);
Expand All @@ -66,7 +66,7 @@ test$(listTrunc) {
return Ok();
}

test$(listClear) {
test$("list-clear") {
List<int> list;

list.pushBack(1);
Expand All @@ -86,7 +86,7 @@ test$(listClear) {
return Ok();
}

test$(listInsert) {
test$("list-insert") {
List<int> list;

list.pushBack(1);
Expand All @@ -111,7 +111,7 @@ test$(listInsert) {
return Ok();
}

test$(listRemove) {
test$("list-remove") {
List<int> list;

list.pushBack(1);
Expand All @@ -134,7 +134,7 @@ test$(listRemove) {
return Ok();
}

test$(listRemoveAt) {
test$("list-remove-at") {
List<int> list;

list.pushBack(1);
Expand All @@ -157,7 +157,7 @@ test$(listRemoveAt) {
return Ok();
}

test$(listIter) {
test$("list-iter") {
List<int> list;

list.pushBack(1);
Expand All @@ -179,7 +179,7 @@ test$(listIter) {
return Ok();
}

test$(listIterRev) {
test$("list-iter-rev") {
List<int> list;

list.pushBack(1);
Expand Down
8 changes: 4 additions & 4 deletions src/libs/karm-base/tests/test-lru.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(lruAccess) {
test$("lru-access") {
Lru<int, int> cache{10};

for (int i = 0; i < 10; i++) {
Expand All @@ -20,7 +20,7 @@ test$(lruAccess) {
return Ok();
}

test$(lruContains) {
test$("lru-contains") {
Lru<int, int> cache{10};
expect$(not cache.contains(0));
(void)cache.access(0, [&] {
Expand All @@ -30,7 +30,7 @@ test$(lruContains) {
return Ok();
}

test$(lruLen) {
test$("lru-len") {
Lru<int, int> cache{10};
expectEq$(cache.len(), 0uz);
(void)cache.access(0, [&] {
Expand All @@ -48,7 +48,7 @@ test$(lruLen) {
return Ok();
}

test$(lruEvict) {
test$("lru-evict") {
Lru<int, int> cache{10};

for (int i = 0; i < 10; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/karm-base/tests/test-rc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(strongRc) {
test$("strong-rc") {
struct S {
int x = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion src/libs/karm-base/tests/test-reflect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Reflectable$(Foo, bar, baz);

namespace Karm::Base::Tests {

test$(reflect) {
test$("reflect") {
using R = Reflect<Foo>;

expectEq$(R::NAME, "Foo");
Expand Down
8 changes: 4 additions & 4 deletions src/libs/karm-base/tests/test-sieve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(sieveAccess) {
test$("sieve-access") {
Sieve<int, int> cache{10};

for (int i = 0; i < 10; i++) {
Expand All @@ -20,7 +20,7 @@ test$(sieveAccess) {
return Ok();
}

test$(sieveContains) {
test$("sieve-contains") {
Sieve<int, int> cache{10};
expect$(not cache.contains(0));
(void)cache.access(0, [&] {
Expand All @@ -30,7 +30,7 @@ test$(sieveContains) {
return Ok();
}

test$(sieveLen) {
test$("sieve-len") {
Sieve<int, int> cache{10};
expectEq$(cache.len(), 0uz);
(void)cache.access(0, [&] {
Expand All @@ -48,7 +48,7 @@ test$(sieveLen) {
return Ok();
}

test$(seiveEvict) {
test$("seive-evict") {
Sieve<int, int> cache{10};

for (int i = 0; i < 10; i++) {
Expand Down
8 changes: 4 additions & 4 deletions src/libs/karm-base/tests/test-string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(defaultConstructedInlineString) {
test$("string-default-constructed-inline") {
InlineString<16> str;

expectEq$(str.len(), 0uz);
Expand All @@ -12,7 +12,7 @@ test$(defaultConstructedInlineString) {
return Ok();
}

test$(valueConstructedInlineString) {
test$("string-value-constructed-inline") {
InlineString<16> str("Hello, World!");

expectEq$(str.len(), 13uz);
Expand All @@ -21,7 +21,7 @@ test$(valueConstructedInlineString) {
return Ok();
}

test$(defaultConstructedString) {
test$("string-default-constructed") {
String str;
expectEq$(str.len(), 0uz);
expectEq$(str, ""s);
Expand All @@ -33,7 +33,7 @@ test$(defaultConstructedString) {
return Ok();
}

test$(valueConstructedString) {
test$("string-value-constructed") {
String str("Hello, World!");

expectEq$(str.len(), 13uz);
Expand Down
4 changes: 2 additions & 2 deletions src/libs/karm-base/tests/test-time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(timespan) {
test$("timespan-builders") {
auto ts = TimeSpan::fromUSecs(2);
expectEq$(ts._value, 2uz);

Expand Down Expand Up @@ -34,7 +34,7 @@ test$(timespan) {
return Ok();
}

test$(timestamp) {
test$("timestamp") {
TimeStamp tst = TimeStamp::epoch();
expectEq$(tst._value, 0uz);

Expand Down
2 changes: 1 addition & 1 deletion src/libs/karm-base/tests/test-vec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Base::Tests {

test$(defaultConstructedVec) {
test$("vec-default-constructed") {
Vec<int> vec;
expectEq$(vec.len(), 0uz);
expectEq$(vec.cap(), 0uz);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/karm-crypto/tests/test-md5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Crypto::Tests {

test$(md5Hash) {
test$("md5-hash") {
return Ok(); // FIXME: disabled until we have a proper implementation

Md5 md5;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/karm-crypto/tests/test-sha2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Karm::Crypto::Tests {

test$(sha256Hash) {
test$("sha256-hash") {
return Ok(); // FIXME: disabled until we have a proper implementation

Sha256 sha256;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/karm-io/tests/test-align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct {
{Align::RIGHT, 9, "hello", " hello"},
};

test$(align) {
test$("fmt-align") {
for (auto [a, width, input, expected] : CASES) {
auto result = try$(format("{}", aligned(input, a, width)));
// logInfo("input: {}, expected: {}, result: {}", input, expected, result);
Expand Down
2 changes: 1 addition & 1 deletion src/libs/karm-io/tests/test-case.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct {
{Case::SPONGE, "NFTs are the future of the web", "NfTs ArE tHe FuTuRe Of ThE wEb"},
};

test$(changeChase) {
test$("case-change") {
for (auto [c, input, expected] : CASES) {
auto result = try$(changeCase(input, c));
expectEq$(result, expected);
Expand Down
Loading

0 comments on commit 654a19b

Please sign in to comment.