mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
parent
fe6f616cf1
commit
d0eacdd0d6
@ -1361,7 +1361,7 @@ namespace std
|
||||
|
||||
/* Define if C99 functions or macros in <stdlib.h> should be imported in
|
||||
<cstdlib> in namespace std for C++11. */
|
||||
/* #undef _GLIBCXX11_USE_C99_STDLIB */
|
||||
#define _GLIBCXX11_USE_C99_STDLIB 1
|
||||
|
||||
/* Define if C99 functions or macros in <wchar.h> should be imported in
|
||||
<cwchar> in namespace std for C++11. */
|
||||
|
@ -34,3 +34,16 @@ build_boot_image {
|
||||
append qemu_args " -nographic "
|
||||
|
||||
run_genode_until ".*test-stdcxx finished.*\n" 20
|
||||
|
||||
grep_output {^\[init }
|
||||
|
||||
compare_output_to {
|
||||
[init -> test-stdcxx] ° °° °°° test-stdcxx started °°° °° °
|
||||
[init -> test-stdcxx] 2015.000000 - 5.000000 - 4
|
||||
[init -> test-stdcxx] 2015 - 5 - 4
|
||||
[init -> test-stdcxx] 123
|
||||
[init -> test-stdcxx] 456
|
||||
[init -> test-stdcxx] 7.8
|
||||
[init -> test-stdcxx] caught std::invalid_argument
|
||||
[init -> test-stdcxx] ° °° °°° test-stdcxx finished °°° °° °
|
||||
}
|
||||
|
@ -48,6 +48,8 @@ static void test_cstdlib()
|
||||
{
|
||||
static ::lldiv_t o __attribute__((used));
|
||||
std::cout << std::strtoul("123", 0, 10) << std::endl;
|
||||
std::cout << std::stoi("456") << std::endl;
|
||||
std::cout << std::stod("7.8") << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user