File: ranges-odr-test.cc

package info (click to toggle)
fmtlib 10.1.1%2Bds1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,860 kB
  • sloc: cpp: 19,684; ansic: 2,022; python: 139; sh: 53; makefile: 25
file content (17 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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>

#include "fmt/ranges.h"
#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]");
}