matchers_ut.cpp 617 B

123456789101112131415
  1. #include <library/cpp/testing/common/env.h>
  2. #include <library/cpp/testing/gtest/gtest.h>
  3. #include <array>
  4. #include <vector>
  5. constexpr std::string_view TEST_DATA_TEXT{"123\n"};
  6. constexpr std::array<char, 4> TEST_DATA_ARRAY{'1', '2', '3', '\n'};
  7. const std::vector<char> TEST_DATA_CHAR_VECTOR{'1', '2', '3', '\n'};
  8. TEST(GoldenFileEq, Example) {
  9. EXPECT_THAT(TEST_DATA_TEXT, NGTest::GoldenFileEq(std::string(SRC_("golden/data.txt"))));
  10. EXPECT_THAT(TEST_DATA_ARRAY, NGTest::GoldenFileEq(TString(SRC_("golden/data.txt"))));
  11. EXPECT_THAT(TEST_DATA_CHAR_VECTOR, NGTest::GoldenFileEq(SRC_("golden/data.txt")));
  12. }