Skip to content

Commit 1658ebb

Browse files
committed
More tests
1 parent ea0447b commit 1658ebb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/unittests.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,22 @@ end
17141714

17151715
# Any operation should immediately convert it:
17161716
@test km ^ -1 isa Quantity{T,DynamicQuantities.SymbolicDimensions{R}} where {T,R}
1717+
1718+
# Test promotion explicitly for coverage:
1719+
@test promote_type(
1720+
SymbolicDimensionsSingleton{Int16},
1721+
SymbolicDimensionsSingleton{Int32}
1722+
) === SymbolicDimensions{Int32}
1723+
# ^ Note how we ALWAYS convert to SymbolicDimensions, even
1724+
# if the types are the same.
1725+
@test promote_type(
1726+
SymbolicDimensionsSingleton{Int16},
1727+
SymbolicDimensions{Int32}
1728+
) === SymbolicDimensions{Int32}
1729+
@test promote_type(
1730+
SymbolicDimensionsSingleton{Int64},
1731+
Dimensions{Int16}
1732+
) === Dimensions{Int64}
17171733
end
17181734

17191735
@testset "Test div" begin

0 commit comments

Comments
 (0)