Skip to content

diff between arrays of Int32 or Float32 shows "nothing" #20

@dpinol

Description

@dpinol

Int64 or Float64 array comparison correctly displays the differences

@testset ExtendedTestSet "ts" begin
       @test [Int64(2)]==[Int64(3)]
       end
....
Diff:
[2, 3]

But for Int32 or Float32 it shows "Nothing"

@testset ExtendedTestSet "ts" begin
       @test [Int32(2)]==[Int32(3)]
 end
....
Diff:
nothing

adding logs to this package I saw that for 32bits, the expressions that gets into Test.record is strangely a Ref

Expr
  head: Symbol call
  args: Array{Any}((3,))
    1: Symbol ==
    2: Expr
      head: Symbol ref
      args: Array{Any}((2,))
        1: Symbol Int32
        2: Int64 2
    3: Expr
      head: Symbol ref
      args: Array{Any}((2,))
        1: Symbol Int32
        2: Int64 3

instead of a vector (which is what I get with 64bits)

Expr
  head: Symbol call
  args: Array{Any}((3,))
    1: Symbol ==
    2: Expr
      head: Symbol vect
      args: Array{Any}((1,))
        1: Float64 2.0
    3: Expr
      head: Symbol vect
      args: Array{Any}((1,))
        1: Float64 3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions