Ejemplo n.º 1
0
 def test_call_i32_i64_f32_f64_f64(self):
     self.assertEqual(
         round(
             Instance(TEST_BYTES).call('i32_i64_f32_f64_f64', [
                 Value.i32(1),
                 Value.i64(2),
                 Value.f32(3.4),
                 Value.f64(5.6)
             ]), 6), 1 + 2 + 3.4 + 5.6)
Ejemplo n.º 2
0
 def test_call_f32_f32(self):
     self.assertEqual(
         Instance(TEST_BYTES).call('f32_f32', [Value.f32(7.)]), 7.)
Ejemplo n.º 3
0
def test_f32_auto_cast():
    assert repr(Value.f32(42)) == 'F32(42.0)'
Ejemplo n.º 4
0
def test_f32():
    assert repr(Value.f32(4.2)) == 'F32(4.2)'
Ejemplo n.º 5
0
 def test_f32_auto_cast(self):
     self.assertEqual(repr(Value.f32(42)), 'F32(42.0)')
Ejemplo n.º 6
0
 def test_f32(self):
     self.assertEqual(repr(Value.f32(4.2)), 'F32(4.2)')