Skip to content

Commit

Permalink
a couple tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Dec 29, 2017
1 parent 77abfda commit c53b166
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions test/linalg/lu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,8 @@ U factor:
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0"""
end

@testset "propertynames" begin
names = sort!(string.(Base.propertynames(lufact(rand(3,3)))))
@test names == ["L", "P", "U", "factors", "info", "ipiv", "p"]
end
2 changes: 1 addition & 1 deletion test/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ mutable struct TLayout
z::Int32
end
tlayout = TLayout(5,7,11)
@test fieldnames(TLayout) == [:x, :y, :z]
@test fieldnames(TLayout) == [:x, :y, :z] == Base.propertynames(tlayout)
@test [(fieldoffset(TLayout,i), fieldname(TLayout,i), fieldtype(TLayout,i)) for i = 1:fieldcount(TLayout)] ==
[(0, :x, Int8), (2, :y, Int16), (4, :z, Int32)]
@test_throws BoundsError fieldtype(TLayout, 0)
Expand Down

0 comments on commit c53b166

Please sign in to comment.