Add tests.

This commit is contained in:
Victor Zverovich 2014-04-25 07:44:35 -07:00
parent 08b0741fa7
commit 5adc272ee7

View File

@ -21,6 +21,14 @@ function (expect_compile_error code)
endif () endif ()
endfunction () endfunction ()
# Array is noncopyable.
expect_compile_error("fmt::internal::Array<char, 5> a, b(a);")
expect_compile_error("fmt::internal::Array<char, 5> a, b; b = a;")
# Writer is noncopyable.
expect_compile_error("fmt::Writer a, b(a);")
expect_compile_error("fmt::Writer a, b; b = a;")
# Writing a wide character to a character stream Writer is forbidden. # Writing a wide character to a character stream Writer is forbidden.
expect_compile_error("fmt::Writer() << L'a';") expect_compile_error("fmt::Writer() << L'a';")
expect_compile_error("fmt::Writer() << fmt::pad(\"abc\", 5, L' ');") expect_compile_error("fmt::Writer() << fmt::pad(\"abc\", 5, L' ');")