2020-11-01 17:45:45 -06:00
|
|
|
#include "storm/Array.hpp"
|
2020-12-08 19:40:26 -06:00
|
|
|
#include "storm/String.hpp"
|
2020-11-01 17:45:45 -06:00
|
|
|
#include "test/Test.hpp"
|
2020-09-24 23:33:18 -05:00
|
|
|
|
2020-12-08 19:42:37 -06:00
|
|
|
TEST_CASE("TSBaseArray", "[array]") {
|
2020-09-24 23:33:18 -05:00
|
|
|
SECTION("constructs correctly") {
|
|
|
|
|
TSBaseArray<uint32_t> array;
|
|
|
|
|
REQUIRE(array.Count() == 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-09-24 23:44:35 -05:00
|
|
|
|
2020-12-08 19:40:26 -06:00
|
|
|
TEST_CASE("TSBaseArray::MemFileName", "[array]") {
|
|
|
|
|
SECTION("returns a non-empty string") {
|
|
|
|
|
TSBaseArray<uint32_t> array;
|
|
|
|
|
REQUIRE(SStrLen(array.MemFileName()) > 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-08 23:12:59 -06:00
|
|
|
TEST_CASE("TSBaseArray::MemLineNo", "[array]") {
|
|
|
|
|
SECTION("returns a negative number") {
|
|
|
|
|
TSBaseArray<uint32_t> array;
|
|
|
|
|
REQUIRE(array.MemLineNo() < 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-08 19:42:37 -06:00
|
|
|
TEST_CASE("TSFixedArray", "[array]") {
|
2020-09-24 23:44:35 -05:00
|
|
|
SECTION("constructs correctly") {
|
|
|
|
|
TSFixedArray<uint32_t> array;
|
|
|
|
|
REQUIRE(array.Count() == 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-09-25 16:50:56 -05:00
|
|
|
|
2020-12-08 19:42:37 -06:00
|
|
|
TEST_CASE("TSGrowableArray", "[array]") {
|
2020-09-25 16:50:56 -05:00
|
|
|
SECTION("constructs correctly") {
|
|
|
|
|
TSGrowableArray<uint32_t> array;
|
|
|
|
|
REQUIRE(array.Count() == 0);
|
|
|
|
|
}
|
|
|
|
|
}
|