@@ -59,6 +59,11 @@ describe UnicodePlot do
5959 p.to_s.should be_a(String )
6060 end
6161
62+ it " accepts Int128 arrays via numeric overload" do
63+ p = UnicodePlot .lineplot([1 _i128, 2 _i128, 3 _i128], [1 _i128, 4 _i128, 9 _i128])
64+ p.to_s.should be_a(String )
65+ end
66+
6267 it " accepts mixed numeric x/y element types" do
6368 p = UnicodePlot .lineplot([1 _i32 , 2 _i32 , 3 _i32 ], [1.0 _f32 , 4.0 _f32 , 9.0 _f32 ])
6469 p.to_s.should be_a(String )
@@ -88,6 +93,13 @@ describe UnicodePlot do
8893 p.series.should eq(prev_series + 1 )
8994 end
9095
96+ it " accepts y-only UInt128 overload in lineplot!" do
97+ p = UnicodePlot .lineplot([1 _u128, 2 _u128, 3 _u128])
98+ prev_series = p.series
99+ UnicodePlot .lineplot!(p, [4 _u128, 5 _u128, 6 _u128])
100+ p.series.should eq(prev_series + 1 )
101+ end
102+
91103 it " ignores extreme finite values without overflowing during rasterization" do
92104 p = UnicodePlot .lineplot([Float64 ::MAX , 0.5 ], [0.5 , 0.5 ])
93105 p.to_s.should be_a(String )
@@ -216,6 +228,11 @@ describe UnicodePlot do
216228 p = UnicodePlot .histogram([1 , 2 , 3 , 2 , 1 ])
217229 p.to_s.should be_a(String )
218230 end
231+
232+ it " accepts UInt128 arrays via generic numeric overload" do
233+ p = UnicodePlot .histogram([1 _u128, 2 _u128, 3 _u128, 2 _u128, 1 _u128])
234+ p.to_s.should be_a(String )
235+ end
219236 end
220237
221238 describe " densityplot" do
@@ -348,6 +365,11 @@ describe UnicodePlot do
348365 p = UnicodePlot .heatmap([[1 , 2 ], [3 , 4 ]])
349366 p.to_s.should be_a(String )
350367 end
368+
369+ it " accepts Int128 matrix via generic numeric overload" do
370+ p = UnicodePlot .heatmap([[1 _i128, 2 _i128], [3 _i128, 4 _i128]])
371+ p.to_s.should be_a(String )
372+ end
351373 end
352374
353375 describe " stairs" do
@@ -367,6 +389,11 @@ describe UnicodePlot do
367389 p = UnicodePlot .stairs([1 , 2 , 3 ], [4 , 5 , 6 ])
368390 p.to_s.should be_a(String )
369391 end
392+
393+ it " accepts UInt128 arrays via generic numeric overload" do
394+ p = UnicodePlot .stairs([1 _u128, 2 _u128, 3 _u128], [4 _u128, 5 _u128, 6 _u128])
395+ p.to_s.should be_a(String )
396+ end
370397 end
371398
372399 describe " BrailleCanvas" do
0 commit comments