Skip to content

Commit d5ca9bb

Browse files
authored
Improve test_dlmalloc_modes test. NFC (#17543)
1 parent b4381fb commit d5ca9bb

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

test/test_other.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6720,13 +6720,8 @@ def test_dlmalloc_modes(self):
67206720
self.assertContained('double-freed', self.run_js('a.out.js'))
67216721
# in debug mode, the double-free is caught
67226722
self.run_process([EMXX, 'src.cpp', '-sASSERTIONS=2'])
6723-
seen_error = False
6724-
out = '?'
6725-
try:
6726-
out = self.run_js('a.out.js')
6727-
except Exception:
6728-
seen_error = True
6729-
self.assertTrue(seen_error, out)
6723+
out = self.run_js('a.out.js', assert_returncode=NON_ZERO)
6724+
self.assertContained('native code called abort()', out)
67306725

67316726
def test_mallocs(self):
67326727
def run(opts):

0 commit comments

Comments
 (0)