We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdbd2fa commit 789e329Copy full SHA for 789e329
1 file changed
test/ufixed.jl
@@ -197,6 +197,15 @@ end
197
@test @inferred(promote(UFixed{UInt8,7}(0.197), UFixed{UInt8,4}(0.8))) ===
198
(UFixed{UInt16,7}(0.197), UFixed{UInt16,7}(0.8))
199
200
+@test UFixed{UInt16,16}(1) == UFixed{UInt8,8}(1)
201
+@test UFixed{UInt16,16}(0.2) == UFixed{UInt8,8}(0.2)
202
+@test UFixed{UInt16,8}(1) == UFixed{UInt8,8}(1)
203
+@test UFixed{UInt16,8}(0.2) == UFixed{UInt8,8}(0.2)
204
+@test UFixed{UInt16,16}(1) == UFixed{UInt8,6}(1)
205
+@test UFixed{UInt16,16}(0.20635) == UFixed{UInt8,6}(0.20635)
206
+@test UFixed{UInt16,4}(1) == UFixed{UInt8,6}(1)
207
+@test UFixed{UInt16,4}(0.2) == UFixed{UInt8,6}(0.2)
208
+
209
@test promote_type(UFixed8,Float32,Int) == Float32
210
@test promote_type(UFixed8,Int,Float32) == Float32
211
@test promote_type(Int,UFixed8,Float32) == Float32
0 commit comments