version 1.0.0-rc.24

This commit is contained in:
2024-11-17 14:55:09 +01:00
parent aeeae33ad9
commit adc13ff33e
361 changed files with 12513 additions and 3314 deletions

View File

@@ -0,0 +1,24 @@
// Copyright (2019-2024) Paul Scherrer Institute
#include <catch2/catch_all.hpp>
#include "../common/AutoIncrVector.h"
TEST_CASE("AutoIncrVector","[AutoIncrVector]") {
AutoIncrVector<int64_t> aiv;
REQUIRE(aiv.size() == 0);
REQUIRE_NOTHROW(aiv.reserve(500));
REQUIRE_THROWS(aiv.reserve(-5));
REQUIRE_THROWS(aiv[-5] = 1);
REQUIRE_NOTHROW(aiv[5] = 1);
REQUIRE(aiv.size() == 6);
REQUIRE(aiv[4] == 0);
REQUIRE(aiv[5] == 1);
const auto &ref = aiv;
REQUIRE(ref[5] == 1);
REQUIRE_THROWS(ref[6]);
}