Test is fixed #111

Closed
wants to merge 9 commits into
from

2 participants

@BenoitT

The test is fixed. The \n was missing on the expected output.

@kripken kripken commented on the diff Nov 3, 2011
system/include/libcxx/ios
@@ -327,7 +327,7 @@ protected:
ios_base() {// purposefully does no initialization
}
- void init(void* __sb);
+ void init(void* __sb) {}
@kripken
Owner
kripken added a line comment Nov 3, 2011

Need // XXX Emscripten here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@kripken kripken commented on an outdated diff Nov 3, 2011
system/include/libcxx/ios
@@ -122,7 +122,7 @@ public:
operator unspecified-bool-type() const;
bool operator!() const;
iostate rdstate() const;
- void clear(iostate state = goodbit);
+ void clear(iostate state = goodbit) {} /* XXX EMScripten */
@kripken
Owner
kripken added a line comment Nov 3, 2011

This change makes the header not compile properly. This is inside another /* */ block, so it breaks the block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@kripken
Owner

Even after the change to the header I mention above with the /* */, the test doesn't pass over here. Does it work for you?

$ python tests/runner.py  clang_1_1.test_iostream
Running Emscripten tests...
test_iostream (__main__.clang_1_1) ... ERROR

======================================================================
ERROR: test_iostream (__main__.clang_1_1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/runner.py", line 2935, in test_iostream
  File "tests/runner.py", line 252, in do_run
  File "tests/runner.py", line 179, in assertContained
Exception: Expected to find 'hello world
' in '/dev/shm/ems_clang_1_1_OFIC5N/src.cpp.o.js:892: TypeError: __ZNSt3__18ios_base5clearEj is not a function
', diff:

--- expected
+++ actual
@@ -1,2 +1,2 @@
-hello world
+/dev/shm/ems_clang_1_1_OFIC5N/src.cpp.o.js:892: TypeError: __ZNSt3__18ios_base5clearEj is not a function
@BenoitT

Everything should be fixed with this

@kripken
Owner

Still fails for me,

$ python tests/runner.py  clang_1_1.test_iostream
Running Emscripten tests...
test_iostream (__main__.clang_1_1) ... ERROR

======================================================================
ERROR: test_iostream (__main__.clang_1_1)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/runner.py", line 2935, in test_iostream
  File "tests/runner.py", line 252, in do_run
  File "tests/runner.py", line 179, in assertContained
Exception: Expected to find 'hello world
' in '/dev/shm/ems_clang_1_1_5inFpU/src.cpp.o.js:1080: TypeError: FUNCTION_TABLE[$13] is not a function
', diff:

--- expected
+++ actual
@@ -1,2 +1,2 @@
-hello world
+/dev/shm/ems_clang_1_1_5inFpU/src.cpp.o.js:1080: TypeError: FUNCTION_TABLE[$13] is not a function

I am starting to think our approach to the C++ standard lib is not a good one. This is turning out to be quite complicated to get things working. Perhaps it would be easier to use a different C++ standard lib or to write our own headers.

@BenoitT

It was working for me because I wasn't using the safe heap. I am trying to find a fix right now.

EDIT: Their is so many weird modifications inside the headers I am considering using the GCC headers instead. I will keep you up-to-date and start a new bug once it works to see if everyone agree to the switch.

@kripken
Owner

I am ok with switching to the gcc headers, if they work better. Thanks for looking into this.

@ghost

@BenoitT: You can probably give up on that. I tried GCC headers and they are THAT platform dependent that it would be really a lot of work IMO to port them to work with Emscripten.
That said - I think you are totally right - the headers need to be cleaned. 90% of the time there is no comment as to why some stuff is outcommented or changed. Normally a few defines should do the trick.
I'd propose to diff against libcxx trunk and to remove as many changes as possible (at least that's what I'm doing in my branch).

@BenoitT

Thank for point me that out, I wasted a full morning on that. I tried to fix the test but I have to fix bunch of problems because the tests doesn't work on Windows. I take notes and I'll probably make a new bug just for that.

@kripken
Owner

Is this still needed? Some of it was meanwhile done in other bugs, and I hope the windows problems no longer exist.

@kripken
Owner

6 months since the last update here, and I do think this is no longer needed, so closing. Reopen if necessary.

@kripken kripken closed this Jan 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment