Skip to content

Commit

Permalink
Disable test that triggers an MSVC bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Nov 12, 2017
1 parent 18a0b94 commit 7967c2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,8 @@ class dynamic_specs_handler :
: specs_setter<char_type>(specs), specs_(specs), context_(ctx) {}

constexpr dynamic_specs_handler(const dynamic_specs_handler &other)
: specs_setter(other), specs_(other.specs_), context_(other.context_) {}
: specs_setter<char_type>(other),
specs_(other.specs_), context_(other.context_) {}

template <typename Id>
constexpr void on_dynamic_width(Id arg_id) {
Expand Down
7 changes: 4 additions & 3 deletions test/format-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1852,10 +1852,8 @@ constexpr bool equal(const char *s1, const char *s2) {
template <typename... Args>
constexpr bool test_error(const char *fmt, const char *expected_error) {
const char *actual_error = nullptr;
test_error_handler eh{actual_error};
using ref = std::reference_wrapper<test_error_handler>;
fmt::internal::check_format_string<char, test_error_handler, Args...>(
string_view(fmt, len(fmt)), eh);
string_view(fmt, len(fmt)), test_error_handler(actual_error));
return equal(actual_error, expected_error);
}

Expand All @@ -1866,7 +1864,10 @@ TEST(FormatTest, FormatStringErrors) {
EXPECT_ERROR("foo", nullptr);
EXPECT_ERROR("}", "unmatched '}' in format string");
EXPECT_ERROR("{0:s", "unknown format specifier", Date);
#ifndef _MSC_VER
// This causes an internal compiler error in MSVC2017.
EXPECT_ERROR("{0:=5", "unknown format specifier", char);
#endif
EXPECT_ERROR("{foo", "missing '}' in format string", int);
EXPECT_ERROR("{10000000000}", "number is too big");
}

0 comments on commit 7967c2f

Please sign in to comment.