|
1 | 1 | using JSON, BinaryBuilder, Test
|
2 | 2 |
|
3 |
| -import BinaryBuilder.BinaryBuilderBase: sourcify, dependencify, major, minor, patch, version |
| 3 | +import BinaryBuilder.BinaryBuilderBase: sourcify |
4 | 4 |
|
5 | 5 | @testset "Meta JSON" begin
|
6 | 6 | meta_json_buff = IOBuffer()
|
@@ -61,25 +61,7 @@ import BinaryBuilder.BinaryBuilderBase: sourcify, dependencify, major, minor, pa
|
61 | 61 | @test sourcify(Dict("type" => "git", "url" => "https://github.com/JuliaLang/julia.git", "hash" => "12345")) == GitSource("https://github.com/JuliaLang/julia.git", "12345")
|
62 | 62 | @test sourcify(Dict("type" => "file", "url" => "https://julialang.org", "hash" => "98765")) == FileSource("https://julialang.org", "98765")
|
63 | 63 | @test_throws ErrorException sourcify(Dict("type" => "qux"))
|
64 |
| - # `PackageSpec(; name = "Foo") != PackageSpec(; name = "Foo")`, so we |
65 |
| - # need to manually compare the fields we care about |
66 |
| - d = dependencify(Dict("type" => "dependency", "name" => "Foo_jll", "uuid" => nothing, |
67 |
| - "version-major" => 0, "version-minor" => 0, "version-patch" => 0)) |
68 |
| - ref_d = Dependency(PackageSpec(; name = "Foo_jll")) |
69 |
| - @test d.pkg.name == ref_d.pkg.name |
70 |
| - @test d.pkg.uuid == ref_d.pkg.uuid |
71 |
| - v = version(d) |
72 |
| - ref_v = version(ref_d) |
73 |
| - @test (major(v), minor(v), patch(v)) == (major(ref_v), minor(ref_v), patch(ref_v)) |
74 |
| - d = dependencify(Dict("type" => "builddependency", "name" => "Qux_jll", "uuid" => nothing, |
75 |
| - "version-major" => 1, "version-minor" => 2, "version-patch" => 3)) |
76 |
| - ref_d = Dependency(PackageSpec(; name = "Qux_jll", version = v"1.2.3")) |
77 |
| - @test d.pkg.name == ref_d.pkg.name |
78 |
| - @test d.pkg.uuid == ref_d.pkg.uuid |
79 |
| - v = version(d) |
80 |
| - ref_v = version(ref_d) |
81 |
| - @test (major(v), minor(v), patch(v)) == (major(ref_v), minor(ref_v), patch(ref_v)) |
82 |
| - @test_throws ErrorException dependencify(Dict("type" => "bar")) |
| 64 | + |
83 | 65 | @test length(meta["products"]) == 4
|
84 | 66 | @test all(in.((LibraryProduct("libfoo", :libfoo), ExecutableProduct("julia", :julia), LibraryProduct("libfoo2", :libfoo2; dlopen_flags=[:RTLD_GLOBAL]), FrameworkProduct("fooFramework", :libfooFramework)), Ref(meta["products"])))
|
85 | 67 | @test length(meta["script"]) == 2
|
|
0 commit comments