| 123456789101112131415161718192021222324252627282930 |
- //
- // prompt_test.cxx
- // cli-test
- //
- // Created by Sam Jaffe on 10/10/20.
- // Copyright © 2020 Sam Jaffe. All rights reserved.
- //
- #include "cli/prompt.h"
- #include <gmock/gmock.h>
- #include <gtest/gtest.h>
- #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
- #undef EXPECT_TRUE
- #define EXPECT_TRUE ASSERT_TRUE
- #undef EXPECT_FALSE
- #define EXPECT_FALSE ASSERT_FALSE
- #endif
- TEST(PromptTest, WillOutputEverythingInMessageWithNoSpaces) {
- std::stringstream out;
- auto msg = cli::make_message("Example", 1, true);
- msg->print(out);
- EXPECT_THAT(out.str(), "Example1true");
- }
|