preserves/implementations/cpp/main.cpp

18 lines
417 B
C++
Raw Normal View History

2023-06-12 21:16:47 +00:00
#include "preserves.hpp"
2023-06-19 21:47:10 +00:00
#include "googletest/gtest/gtest.h"
2023-06-12 21:16:47 +00:00
2023-06-19 21:47:10 +00:00
using namespace std;
using namespace Preserves;
TEST(Value, Basics) {
auto vs = Value<>::from(vector<Value<>>{
Value<>::from(1),
Value<>::from(2U),
Value<>::from(3),
});
ASSERT_EQ(3U, vs.size());
ASSERT_EQ(1U, vs[0].to_unsigned());
ASSERT_EQ(2U, vs[1].to_unsigned());
ASSERT_EQ(3U, vs[2].to_unsigned());
}