From 398f541cec7212561b34d0972073ca0cdd73d070 Mon Sep 17 00:00:00 2001 From: dzaima Date: Thu, 10 Oct 2024 01:07:41 +0300 Subject: [PATCH] make tests handle usz=64 differences --- test/cases/prims.bqn | 6 ++++-- test/cases/system.bqn | 4 +++- test/run.bqn | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/cases/prims.bqn b/test/cases/prims.bqn index 26f56a87..c23d7b11 100644 --- a/test/cases/prims.bqn +++ b/test/cases/prims.bqn @@ -84,8 +84,10 @@ !"𝕨/𝕩: Compound 𝕨 must have rank at most 1" % (1‿2⥊<↕4) / ↕4 !"𝕨/𝕩: 𝕨 must consist of natural numbers" % ⟨↕4, 1‿2‿3.5‿4⟩ / 4‿4⥊↕16 !"𝕨/𝕩: 𝕨 must consist of natural numbers" % ⟨↕4, 3.5⟩ / 4‿4⥊↕16 -!"Integer out of range: 4.611686018427388e18" % ⟨1,2⋆62⟩ / 2‿2⥊<⋈0 -!"Integer out of range: 4.611686018427388e18" % ⟨1,2⋆62⟩ / 2⥊<⋈0 +!"Integer out of range: 4.611686018427388e18" % ⟨1,2⋆62⟩ / 2‿2⥊<⋈0 %USZ32 +!"Integer out of range: 4.611686018427388e18" % ⟨1,2⋆62⟩ / 2⥊<⋈0 %USZ32 +!"Out of memory" % ⟨1,2⋆62⟩ / 2‿2⥊<⋈0 %USZ64 +!"Out of memory" % ⟨1,2⋆62⟩ / 2⥊<⋈0 %USZ64 ⟨↕4, 0, ↕5⟩ / 4‿4‿5⥊@ %% 6‿0‿10⥊@ ⟨↕4, 4⥊0, ↕5⟩ / 4‿4‿5⥊@ %% 6‿0‿10⥊@ 1‿0‿2 / ⋈¨ ["ab","cd","ef"] %% ⋈¨ ["ab","ef","ef"] diff --git a/test/cases/system.bqn b/test/cases/system.bqn index ae40b73c..88938151 100644 --- a/test/cases/system.bqn +++ b/test/cases/system.bqn @@ -296,7 +296,9 @@ r←•MakeRand 1 ⋄ ! 1¨⊸≡ ∊{𝕊: 500 r.Deal 1000}¨ ↕4 !"•bit._cast: incompatible lengths" % 8‿32•bit._cast 10⥊0 !"•bit._cast: unsupported width 1073741824" % (2⥊2⋆30)•bit._cast ⋈0 -!"Integer out of range: 1125899906842624" % (2⥊2⋆50)•bit._cast ⋈0 +!"•bit._cast: unsupported width 1125899906842624" % (2⥊2⋆50)•bit._cast ⋈0 %USZ64 +!"Integer out of range: 1125899906842624" % (2⥊2⋆50)•bit._cast ⋈0 %USZ32 +!"Integer out of range: 1.180591620717411e21" % (2⥊2⋆70)•bit._cast ⋈0 !"Integer out of range: ∞" % (2⥊∞)•bit._cast ⋈0 !"•bit._cast: unsupported width 12" % 1‿12•bit._cast 11⥊0 diff --git a/test/run.bqn b/test/run.bqn index ec16aa0f..23bdee9d 100644 --- a/test/run.bqn +++ b/test/run.bqn @@ -42,6 +42,7 @@ o ← { pr ← {⟨P⇐Properties⟩: @P@; 32‿0} •internal properFills ⇐ 1⊑pr + usz ⇐ ⊑pr noerr∨↩ heapverify update∧↩ ¬heapverify files ⇐ (i=≠named)/args @@ -100,6 +101,7 @@ Run ← { 𝕊 testname: enabled∧↩ ¬ o.debug ∧ Flag "%!DEBUG" enabled∧↩ ¬ o.heapverify ∧ Flag "%!HEAPVERIFY" enabled∧↩ {0‿0: 1; 1‿0: o.properfills; 0‿1: ¬o.properfills} Flag¨ "%PROPER_FILLS"‿"%!PROPER_FILLS" + enabled∧↩ {0‿0: 1; 1‿0: o.usz=32; 0‿1: o.usz=64} Flag¨ "%USZ32"‿"%USZ64" ln ⇐ i-1 str ⇐ str # at end to let Flag have updated it