aboutsummaryrefslogtreecommitdiff
path: root/test/common/StringTest.cpp
blob: a0895af9c42c041ca28cb4f87aefe4d8c09606cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "cru/common/String.hpp"

#include <gtest/gtest.h>

TEST(String, Append) {
  using cru::String;

  String s;
  s.append(u"ha");
  s.append(s);
  ASSERT_EQ(s, String(u"haha"));
}

TEST(String, Format) {
  using cru::Format;
  using cru::String;

  ASSERT_EQ(Format(u"{} + {} = {}", 123, 321, 444), String(u"123 + 321 = 444"));
}