MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test_is_bitcode

Method test_is_bitcode

test/test_other.py:10443–10458  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10441 self.assertContained('Hello, world!', ret)
10442
10443 def test_is_bitcode(self):
10444 fname = 'tmp.o'
10445
10446 with open(fname, 'wb') as f:
10447 f.write(b'foo')
10448 self.assertFalse(is_bitcode(fname))
10449
10450 with open(fname, 'wb') as f:
10451 f.write(b'\xDE\xC0\x17\x0B')
10452 f.write(16 * b'\x00')
10453 f.write(b'BC')
10454 self.assertTrue(is_bitcode(fname))
10455
10456 with open(fname, 'wb') as f:
10457 f.write(b'BC')
10458 self.assertTrue(is_bitcode(fname))
10459
10460 def test_is_ar(self):
10461 fname = 'tmp.a'

Callers

nothing calls this directly

Calls 3

is_bitcodeFunction · 0.85
openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected