Revision b7836db4527e07a07d2415a8780294e9067a1f97 authored by traktofon on 11 April 2017, 20:16:56 UTC, committed by Steven G. Johnson on 11 April 2017, 20:16:56 UTC
It byte-swaps the real and imaginary parts individually, following
what Fortran compilers do.

The tests read the binary test data from an ad-hoc IOBuffer,
because reinterpret doesn't work for complex numbers.
1 parent 64dbcbc
Raw File
workspace.jl
# This file is a part of Julia. License is MIT: http://julialang.org/license

script = """
# Issue #11948
f(x) = x+1
workspace()
@assert !isdefined(:f)
LastMain.f(2)

# PR #12990
io = IOBuffer()
show(io, Pair)
@assert String(take!(io)) == "Pair"
@assert !Base.inbase(LastMain)
"""
exename = Base.julia_cmd()
run(`$exename --startup-file=no -e $script`)

# issue #17764
script2 = """
mutable struct Foo end
workspace()
mutable struct Foo end
@assert Tuple{Type{LastMain.Foo}} !== Tuple{Type{Main.Foo}}
"""
run(`$exename --startup-file=no -e $script2`)
back to top