Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions test/Manifest.toml

This file was deleted.

6 changes: 5 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[deps]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
SafeTestsets = "0.0.1, 0.1"
SciMLTesting = "1"
Suppressor = "0.2.8"
Test = "1"
33 changes: 33 additions & 0 deletions test/commutation_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using ConcreteStructs
using Test

# this has been working for a while already
Base.@kwdef @concrete struct Foo2{T <: Real}
x::T = 1.0
y = true
z = 42
end

foo = Foo2()
@test typeof(foo) === Foo2{Float64, Bool, Int64}

# this is new
@concrete Base.@kwdef struct Foo3{T <: Real}
x::T = 1.0
y = true
z = 42
end

foo = Foo3()
@test typeof(foo) === Foo3{Float64, Bool, Int64}

foo = Foo3(z = [1, 2, 3])
@test typeof(foo) === Foo3{Float64, Bool, Vector{Int64}}

# terse test case, unfortunately doesn't work the other way around. But also never did.
@concrete terse Base.@kwdef struct TerseKWDef
a = 1.0
b = true
end
terse_kw_def = TerseKWDef(b = false)
@test typeof(terse_kw_def) === TerseKWDef{Float64, Bool}
237 changes: 0 additions & 237 deletions test/core.jl

This file was deleted.

Loading
Loading