From 6798c1704efc3c6c997913fb9d2cf6496b004d53 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 29 Apr 2014 06:26:37 -0700 Subject: [PATCH] Add tests. --- test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 051b11df..2a397e97 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -29,6 +29,10 @@ expect_compile_error("fmt::internal::Array a, b; b = a;") expect_compile_error("fmt::Writer a, b(a);") expect_compile_error("fmt::Writer a, b; b = a;") +# Formatter is not copyable from a temporary. +expect_compile_error("fmt::Formatter<> a(fmt::Formatter<>(\"a\"));") +expect_compile_error("fmt::Formatter<> b(\"a\"); b = fmt::Formatter<>(\"b\");") + # Writing a wide character to a character stream Writer is forbidden. expect_compile_error("fmt::Writer() << L'a';") expect_compile_error("fmt::Writer() << fmt::pad(\"abc\", 5, L' ');")