-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!
Description
STL/tests/libcxx/skipped_tests.txt
Lines 564 to 565 in be0441c
| # STL bug: We don't match numpunct groups correctly in do_get | |
| localization\locale.categories\category.numeric\locale.num.get\facet.num.get.members\get_long.pass.cpp |
Reduced test case:
C:\Temp>type meow.cpp
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <cassert>
#include <cstddef>
#include <ios>
#include <locale>
#include <streambuf>
#include <string>
class my_facet : public std::num_get<char, const char*> {
public:
explicit my_facet(std::size_t refs = 0) : std::num_get<char, const char*>(refs) {}
};
class my_numpunct : public std::numpunct<char> {
protected:
virtual char_type do_thousands_sep() const {
return '_';
}
virtual std::string do_grouping() const {
return "\1\2\3";
}
};
int main() {
const my_facet f(1);
std::ios my_ios(nullptr);
my_ios.imbue(std::locale{std::locale{}, new my_numpunct});
long v = -1;
const char str[] = "+1_";
std::ios_base::iostate err = std::ios_base::goodbit;
const char* const iter = f.get(std::begin(str), std::end(str), my_ios, err, v);
assert(iter == std::end(str) - 1);
assert(err == std::ios_base::failbit);
assert(v == 1);
}C:\Temp>cl /EHsc /nologo /W4 /MTd meow.cpp && meow
meow.cpp
Assertion failed: v == 1, file meow.cpp, line 42
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!