| 123456789101112131415161718192021222324252627 |
- //
- // tokenizer_test.cxx
- // string-utils
- //
- // Created by Sam Jaffe on 10/8/20.
- // Copyright © 2020 Sam Jaffe. All rights reserved.
- //
- #include "string_utils/tokenizer.h"
- #include <gmock/gmock.h>
- #include <gtest/gtest.h>
- using namespace string_utils;
- #if XCODE_UNIT_TEST
- // This is a hack to allow XCode to properly display failures when running
- // unit tests.
- #undef EXPECT_THAT
- #define EXPECT_THAT ASSERT_THAT
- #endif
- TEST(TokenizerTest, SplitsStringOverToken) {
- std::string const input = "A.B.C.D";
- std::vector<std::string> const expected{"A", "B", "C", "D"};
- EXPECT_THAT(split(input, "."), expected);
- }
|