From b0f6ae80f50a235f0aa1acbd913cd55afa01bace Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Tue, 23 Jul 2024 16:50:53 +0200 Subject: [PATCH] fix default value for global floats in spectest --- src/script/spectest.ml | 4 ++-- test/script/reference.t | 4 ---- test/script/reference_opt.t | 4 ---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/script/spectest.ml b/src/script/spectest.ml index e7404e285..7ea0e8264 100644 --- a/src/script/spectest.ml +++ b/src/script/spectest.ml @@ -154,12 +154,12 @@ let m = } ; MGlobal { typ = (Const, Num_type F32) - ; init = [ F32_const Float32.zero ] + ; init = [ F32_const (Float32.of_float 666.6) ] ; id = Some "global_f32" } ; MGlobal { typ = (Const, Num_type F64) - ; init = [ F64_const Float64.zero ] + ; init = [ F64_const (Float64.of_float 666.6) ] ; id = Some "global_f64" } ; MExport { name = "func"; desc = Export_func (Some (Text "func")) } diff --git a/test/script/reference.t b/test/script/reference.t index 0014a00e0..2c13f126e 100644 --- a/test/script/reference.t +++ b/test/script/reference.t @@ -54,10 +54,6 @@ 24 24 13 - got: f32.const 0 - expected: (f32.const 666.599_975_585_937_5) - bad result - [3] $ owi script --no-exhaustion reference/inline-module.wast $ owi script --no-exhaustion reference/int_exprs.wast $ owi script --no-exhaustion reference/int_literals.wast diff --git a/test/script/reference_opt.t b/test/script/reference_opt.t index 030425184..cfd9d4623 100644 --- a/test/script/reference_opt.t +++ b/test/script/reference_opt.t @@ -54,10 +54,6 @@ 24 24 13 - got: f32.const 0 - expected: (f32.const 666.599_975_585_937_5) - bad result - [3] $ owi script --no-exhaustion --optimize reference/inline-module.wast $ owi script --no-exhaustion --optimize reference/int_exprs.wast $ owi script --no-exhaustion --optimize reference/int_literals.wast