ranges-odr-test.cc 454 B

1234567891011121314151617
  1. // Formatting library for C++ - the core API
  2. //
  3. // Copyright (c) 2012 - present, Victor Zverovich
  4. // All rights reserved.
  5. //
  6. // For the license information refer to format.h.
  7. #include <vector>
  8. #include "fmt/ranges.h"
  9. #include "gtest/gtest.h"
  10. // call fmt::format from another translation unit to test ODR
  11. TEST(ranges_odr_test, format_vector) {
  12. auto v = std::vector<int>{1, 2, 3, 5, 7, 11};
  13. EXPECT_EQ(fmt::format("{}", v), "[1, 2, 3, 5, 7, 11]");
  14. }