diff --git a/test/Project.toml b/test/Project.toml index 90b315b86..edde91deb 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -27,6 +27,7 @@ StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +YaoBlocks = "418bc28f-b43b-5e0b-a6e7-61bbc1a2c1df" [compat] Adapt = "4.1" diff --git a/test/integration/yao.jl b/test/integration/yao.jl new file mode 100644 index 000000000..cf9d27ff3 --- /dev/null +++ b/test/integration/yao.jl @@ -0,0 +1,11 @@ +using YaoBlocks, Reactant + +@testset "YaoBlocks" begin + f(θ) = mat(Rx(θ)) + + x = ConcreteRNumber(0.0) + @test @jit(f(x)) ≈ f(0.0) + + x = ConcreteRNumber(1.0) + @test @jit(f(x)) ≈ f(1.0) +end diff --git a/test/runtests.jl b/test/runtests.jl index 2b3238d10..81f2f5ed8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -63,6 +63,7 @@ const REACTANT_TEST_GROUP = lowercase(get(ENV, "REACTANT_TEST_GROUP", "all")) @safetestset "AbstractFFTs" include("integration/fft.jl") @safetestset "Random" include("integration/random.jl") @safetestset "Python" include("integration/python.jl") + @safetestset "YaoBlocks" include("integration/yao.jl") end if REACTANT_TEST_GROUP == "all" || REACTANT_TEST_GROUP == "neural_networks"