2021-09-02 15:47:44 +00:00
|
|
|
// Formatting library for C++ - the core API
|
|
|
|
//
|
|
|
|
// Copyright (c) 2012 - present, Victor Zverovich
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// For the license information refer to format.h.
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2024-01-13 17:44:59 +00:00
|
|
|
#include "fmt/format.h"
|
2021-11-25 16:52:21 +00:00
|
|
|
#include "fmt/ranges.h"
|
2021-09-02 15:47:44 +00:00
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
|
|
|
// call fmt::format from another translation unit to test ODR
|
|
|
|
TEST(ranges_odr_test, format_vector) {
|
|
|
|
auto v = std::vector<int>{1, 2, 3, 5, 7, 11};
|
|
|
|
EXPECT_EQ(fmt::format("{}", v), "[1, 2, 3, 5, 7, 11]");
|
|
|
|
}
|