Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test is fixed #111

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/library.js
Expand Up @@ -4148,6 +4148,13 @@ LibraryManager.library = {
f1: 0 // We never overflow... for now
};
},

llvm_uadd_with_overflow_i32: function(x, y) {
return {
f0: x+y,
f1: 0
};
},

llvm_stacksave: function() {
var self = _llvm_stacksave;
Expand Down
6 changes: 3 additions & 3 deletions system/include/libcxx/__locale
Expand Up @@ -57,7 +57,7 @@ public:
*/

// construct/copy/destroy:
locale() _NOEXCEPT;
locale() _NOEXCEPT {} /* XXX EMScripten */
locale(const locale&) _NOEXCEPT;
explicit locale(const char*);
explicit locale(const string&);
Expand All @@ -67,7 +67,7 @@ public:
_LIBCPP_INLINE_VISIBILITY locale(const locale&, _Facet*);
locale(const locale&, const locale&, category);

~locale();
~locale() {} /* XXX EMScripten */

const locale& operator=(const locale&) _NOEXCEPT;

Expand All @@ -92,7 +92,7 @@ private:
void __install_ctor(const locale&, facet*, long);
static locale& __global();
bool has_facet(id&) const;
const facet* use_facet(id&) const;
const facet* use_facet(id&) const { return 0; } /* XXX EMScripten */

template <class _Facet> friend bool has_facet(const locale&) _NOEXCEPT;
template <class _Facet> friend const _Facet& use_facet(const locale&);
Expand Down
6 changes: 3 additions & 3 deletions system/include/libcxx/ios
Expand Up @@ -285,7 +285,7 @@ public:

// 27.5.2.3 locales:
locale imbue(const locale& __loc);
locale getloc() const;
locale getloc() const { return locale(); } /* XXX EMScripten */

// 27.5.2.5 storage:
static int xalloc();
Expand All @@ -308,7 +308,7 @@ public:
static bool sync_with_stdio(bool __sync = true);

_LIBCPP_INLINE_VISIBILITY iostate rdstate() const;
void clear(iostate __state = goodbit);
void clear(iostate __state = goodbit) {} /* XXX EMScripten */
_LIBCPP_INLINE_VISIBILITY void setstate(iostate __state);

_LIBCPP_INLINE_VISIBILITY bool good() const;
Expand All @@ -327,7 +327,7 @@ protected:
ios_base() {// purposefully does no initialization
}

void init(void* __sb);
void init(void* __sb) {} /* XXX EMScripten */
_LIBCPP_ALWAYS_INLINE void* rdbuf() const {return __rdbuf_;}

_LIBCPP_ALWAYS_INLINE
Expand Down
3 changes: 1 addition & 2 deletions system/include/libcxx/ostream
Expand Up @@ -204,7 +204,6 @@ protected:
basic_ostream() {} // extension, intentially does not initialize
};

/*
template <class _CharT, class _Traits>
class _LIBCPP_VISIBLE basic_ostream<_CharT, _Traits>::sentry
{
Expand Down Expand Up @@ -1285,7 +1284,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
(use_facet<ctype<_CharT> >(__os.getloc()).widen('0'),
use_facet<ctype<_CharT> >(__os.getloc()).widen('1'));
}
*/

//extern template class basic_ostream<char>; /* XXX EMScripten */
//extern template class basic_ostream<wchar_t>; /* XXX EMScripten */

Expand Down
4 changes: 2 additions & 2 deletions tests/runner.py
Expand Up @@ -2927,12 +2927,12 @@ def test_iostream(self):

int main()
{
std::cout << "hello world";
std::cout << "hello world" << std::endl;
return 0;
}
'''

self.do_run(src, 'hello world')
self.do_run(src, 'hello world\n')

def test_stdvec(self):
src = '''
Expand Down