diff --git a/test/cases/prims.bqn b/test/cases/prims.bqn index c23d7b11..1fbdbc4a 100644 --- a/test/cases/prims.bqn +++ b/test/cases/prims.bqn @@ -17,6 +17,19 @@ {⇐}(=⋈≡){⇐} %% 0‿0 {⇐}(≠⋈≢){⇐} %% 1‿1 +# comparison +w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +w←1‿1⥊1 ⋄ x←2⥊1 ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +!"Invalid comparison" % <˜{⇐} +!"Invalid comparison" % ≤˜{⇐} +!"Invalid comparison" % >˜{⇐} +!"Invalid comparison" % ≥˜{⇐} +{! 5 (𝕏 ≡ 𝕏⌾⋈) ↕10}¨ =‿≠‿<‿>‿≤‿≥ +{! (↕10) (𝕏 ≡ 𝕏⌾⋈) 5}¨ =‿≠‿<‿>‿≤‿≥ +{! (↕10) (𝕏 ≡ 𝕏⌾⋈) 4⌊↕10}¨ =‿≠‿<‿>‿≤‿≥ + # !𝕩 & 𝕨!𝕩 !"Assertion error" % !0 !"Assertion error" % !0 @@ -145,19 +158,6 @@ a←↕2 ⋄ ! "e" ≡ (↕10){b←a‿a‿a‿a‿a‿a‿a‿a‿a‿a ⋄ !"⊑: Leaf arrays in 𝕨 must have rank 1 (element: (1‿2⥊1‿2))" % %USE evar ⋄ (≍1‿2) {⟨𝕨⟩⊑𝕩}_evar ↕5‿5 %USE eqvar ⋄ 1‿2 ⊑_eqvar ↕5‿5 %% 1‿2 -# comparison -w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ -w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ -w←1‿1⥊1 ⋄ x←2⥊1 ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ -w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ -!"Invalid comparison" % <˜{⇐} -!"Invalid comparison" % ≤˜{⇐} -!"Invalid comparison" % >˜{⇐} -!"Invalid comparison" % ≥˜{⇐} -{! 5 (𝕏 ≡ 𝕏⌾⋈) ↕10}¨ =‿≠‿<‿>‿≤‿≥ -{! (↕10) (𝕏 ≡ 𝕏⌾⋈) 5}¨ =‿≠‿<‿>‿≤‿≥ -{! (↕10) (𝕏 ≡ 𝕏⌾⋈) 4⌊↕10}¨ =‿≠‿<‿>‿≤‿≥ - # >𝕩 !">: Result rank too large (200 ≡ =𝕩, 205 ≡ =⊑𝕩)" % > (200⥊1)⥊<(205⥊1)⥊1 !">: Incompatible element shapes (encountered shapes ⟨2⟩ and 4‿5)" % > ↕¨⟨2, 4‿5⟩