error tests for selecting from an empty array
This commit is contained in:
parent
b13e4101fa
commit
3a8d0be5a4
@ -243,7 +243,7 @@ B select_c2(B t, B w, B x) {
|
||||
|
||||
B xf = getFillR(x);
|
||||
usz xn = *SH(x);
|
||||
if (xn==0) goto def_xf_base;
|
||||
if (xn==0) goto def_xf_base; // empty x, non-empty w; error
|
||||
usz csz = arr_csz(x);
|
||||
u8 xl = cellWidthLog(x);
|
||||
usz ria = wia * csz;
|
||||
|
||||
@ -165,6 +165,15 @@ w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨"𝕨",•Repr𝕩,
|
||||
)
|
||||
0‿0‿0 ⊏ 1‿3⥊↕10 %% 3‿3⥊0‿1‿2
|
||||
≢¨ ⟨(2‿0‿3‿4‿5⥊1)⊏9‿8‿0‿7⥊0 ⋄ ⟨⟩⊏0‿8‿0‿7⥊0 ⋄ (2‿3‿0‿4⥊1)⊏↕10⟩ %% ⟨2‿0‿3‿4‿5‿8‿0‿7,0‿8‿0‿7,2‿3‿0‿4⟩
|
||||
!"𝕨⊏𝕩: Indices out of range" % %USE evar ⋄ 0‿0 ⊏_evar ↕0
|
||||
!"𝕨⊏𝕩: Indices out of range" % %USE evar ⋄ 0‿0 ⊏_evar 0‿2⥊1
|
||||
!"𝕨⊏𝕩: Indices out of range" % %USE evar ⋄ [0‿0,0‿0] ⊏_evar ↕0
|
||||
!"𝕨⊏𝕩: Indices out of range" % %USE evar ⋄ [0‿0,0‿0] ⊏_evar 0‿0⥊1
|
||||
!"𝕨⊏𝕩: Indices out of range" % %USE evar ⋄ ⟨0‿0⟩ ⊏_evar 0‿2⥊1
|
||||
!"𝕨⊏𝕩: Indices out of range" % %USE evar ⋄ ⟨0‿0⟩ ⊏_evar ↕0
|
||||
!"𝕨⊏𝕩: Indices out of range" % %USE evar ⋄ ⟨0‿0,0‿0⟩ ⊏_evar 2‿0⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (0∊𝕨, 0≡≠𝕩)" % %USE evar ⋄ ⟨0⟩ ⊏_evar ↕0
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (0∊𝕨, 0≡≠𝕩)" % %USE evar ⋄ ⟨⋈0⟩ ⊏_evar ↕0
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % ⊏˜(200⥊1)⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (24∊𝕨, 4≡≠𝕩)" % %USE evar ⋄ 1‿24 ⊏_evar ↕4‿4
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (¯24∊𝕨, 4≡≠𝕩)" % %USE evar ⋄ 1‿¯24 ⊏_evar ↕4‿4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user