Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/test/container_test.cpp
blob: fca3bca7392163af3d5a2aa204e5bb3827034f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "StarSet.hpp"

#include "gtest/gtest.h"

using namespace Star;

TEST(SetTest, All) {
  Set<int> a = {1, 2, 3, 4};
  Set<int> b = {2, 4, 5};
  EXPECT_EQ(a.difference(b), Set<int>({1, 3}));
  EXPECT_EQ(a.intersection(b), Set<int>({2, 4}));
  EXPECT_EQ(a.combination(b), Set<int>({1, 2, 3, 4, 5}));
}