Mercurial > repos > public > sbplib_julia
comparison test/LazyTensors/tuple_manipulation_test.jl @ 1225:6567e38b05ca refactor/LazyTensors/tuple_manipulation
Replace flatten_tuple with concatenate_tuple
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 18 Feb 2023 12:24:44 +0100 |
parents | 5bfb182e24dc |
children | 06b983f0d236 |
comparison
equal
deleted
inserted
replaced
1224:e2f6dafb5d83 | 1225:6567e38b05ca |
---|---|
93 @test LazyTensors.concatenate_tuples((),(1,)) == (1,) | 93 @test LazyTensors.concatenate_tuples((),(1,)) == (1,) |
94 @test LazyTensors.concatenate_tuples((1,2,3),(4,5)) == (1,2,3,4,5) | 94 @test LazyTensors.concatenate_tuples((1,2,3),(4,5)) == (1,2,3,4,5) |
95 @test LazyTensors.concatenate_tuples((1,2,3),(4,5),(6,7)) == (1,2,3,4,5,6,7) | 95 @test LazyTensors.concatenate_tuples((1,2,3),(4,5),(6,7)) == (1,2,3,4,5,6,7) |
96 end | 96 end |
97 | 97 |
98 @testset "flatten_tuple" begin | |
99 @test LazyTensors.flatten_tuple((1,)) == (1,) | |
100 @test LazyTensors.flatten_tuple((1,2,3,4,5,6)) == (1,2,3,4,5,6) | |
101 @test LazyTensors.flatten_tuple((1,2,(3,4),5,6)) == (1,2,3,4,5,6) | |
102 @test LazyTensors.flatten_tuple((1,2,(3,(4,5)),6)) == (1,2,3,4,5,6) | |
103 @test LazyTensors.flatten_tuple(((1,2),(3,4),(5,),6)) == (1,2,3,4,5,6) | |
104 end | |
105 | |
106 @testset "left_pad_tuple" begin | 98 @testset "left_pad_tuple" begin |
107 @test LazyTensors.left_pad_tuple((1,2), 0, 2) == (1,2) | 99 @test LazyTensors.left_pad_tuple((1,2), 0, 2) == (1,2) |
108 @test LazyTensors.left_pad_tuple((1,2), 0, 3) == (0,1,2) | 100 @test LazyTensors.left_pad_tuple((1,2), 0, 3) == (0,1,2) |
109 @test LazyTensors.left_pad_tuple((3,2), 1, 6) == (1,1,1,1,3,2) | 101 @test LazyTensors.left_pad_tuple((3,2), 1, 6) == (1,1,1,1,3,2) |
110 | 102 |