btool
A parser/converter/transpiler for .bib files
StylePropertiesTest.cpp
Go to the documentation of this file.
1 #include <StyleProperties.hpp>
2 #include <gtest/gtest.h>
3 #include <vector>
4 
5 using namespace std::literals::string_literals;
6 
7 TEST(StylePropertiesTests, noArgConstructionTest) {
8  ASSERT_NO_THROW(StyleProperties());
9 }
10 
11 TEST(StylePropertiesTests, constructionTest) {
12  std::unordered_set<std::string> required = {
13  "first name"s,
14  "second name"s
15  };
16  std::unordered_set<std::string> optional = {
17  "first name"s,
18  "second name"s
19  };
20  ASSERT_NO_THROW(([&](){
21  const StyleProperties a{"a name"s, required, optional};
22  }()));
23 }
24 
25 TEST(StylePropertiesTests, equalityOperatorTest) {
26  const auto first = StyleProperties{"name"s, {"a"s, "b"s, "c"s}, {"a"s, "b"s, "c"s}};
27  const auto second = StyleProperties{"name"s, {"a"s, "c"s, "b"s}, {"c"s, "b"s, "a"s}};
28  ASSERT_NO_THROW(ASSERT_EQ(first, second));
29 }
StyleProperties
style-properties-container
Definition: StyleProperties.hpp:11
TEST
TEST(StylePropertiesTests, noArgConstructionTest)
Definition: StylePropertiesTest.cpp:7
StyleProperties.hpp