Skip to content

Commit a813f4b

Browse files
committed
switch tests to iostream fully
1 parent adac9a1 commit a813f4b

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

test/standalone/cxx_stl/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CFLAGS = -Wall -Wextra -Wno-deprecated-declarations -std=c17 -Oz
1212
CXXFLAGS = -Wall -Wextra -Wno-deprecated-declarations -std=c++20 -Oz
1313

1414
PREFER_OS_LIBC = NO
15+
HAS_PRINTF = YES
1516

1617
# ----------------------------
1718

test/standalone/cxx_stl/src/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ int run_tests(void) {
4242
return ret;
4343
}
4444

45+
extern "C" void init_iostream(void);
46+
4547
int main(void) {
48+
init_iostream();
49+
4650
os_ClrHome();
4751
int failed_test = run_tests();
4852
if (failed_test != 0) {

test/standalone/iostream/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CFLAGS = -Wall -Wextra -std=c17 -Oz
1212
CXXFLAGS = -Wall -Wextra -std=c++20 -Oz
1313

1414
PREFER_OS_LIBC = NO
15+
HAS_PRINTF = YES
1516

1617
# ----------------------------
1718

test/standalone/iostream/src/main.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
#include <cstdio>
66
#include <iostream>
77

8+
extern "C" void init_iostream(void);
9+
810
int main(void) {
11+
init_iostream();
12+
913
os_ClrHome();
1014

1115
int value = 123;
16+
printf("start: %d\n", value);
17+
1218
volatile bool* test = (volatile bool*)0xE40000;
13-
if (*test) {
19+
if (true || *test) {
1420
std::cout << value;
1521
}
1622

0 commit comments

Comments
 (0)