From b66c22f66300786bf2ba2afcd40bd9a398daa6e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Gauth=C3=A9?= Date: Thu, 7 Nov 2024 12:32:47 -0500 Subject: [PATCH] add tests --- NDTensors/src/lib/GradedAxes/test/test_dual.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NDTensors/src/lib/GradedAxes/test/test_dual.jl b/NDTensors/src/lib/GradedAxes/test/test_dual.jl index 17c03c8edd..8fdc811905 100644 --- a/NDTensors/src/lib/GradedAxes/test/test_dual.jl +++ b/NDTensors/src/lib/GradedAxes/test/test_dual.jl @@ -64,15 +64,21 @@ end la = labelled(1:2, U1(1)) @test la isa LabelledUnitRange @test label(la) == U1(1) + @test blocklabels(la) == U1(1) @test unlabel(la) == 1:2 @test la == 1:2 @test !isdual(la) + @test labelled_isequal(la, la) + @test space_isequal(la, la) lad = dual(la) @test lad isa LabelledUnitRangeDual @test label(lad) == U1(-1) + @test blocklabels(lad) == U1(-1) @test unlabel(lad) == 1:2 @test lad == 1:2 + @test labelled_isequal(lad, lad) + @test space_isequal(lad, lad) @test !labelled_isequal(la, lad) @test !space_isequal(la, lad) @test isdual(lad) @@ -84,8 +90,11 @@ end lad = dual(la) @test lad isa LabelledUnitRangeDual @test label(lad) == 'x' + @test blocklabels(la) == 'x' @test unlabel(lad) == 1:2 @test lad == 1:2 + @test labelled_isequal(lad, lad) + @test space_isequal(lad, lad) @test labelled_isequal(la, lad) @test !space_isequal(la, lad) @test isdual(lad)