From 8de97e26cabb4942cf1e0af157008d646e986005 Mon Sep 17 00:00:00 2001 From: Lionel Zoubritzky Date: Fri, 10 Jul 2020 23:13:04 +0200 Subject: [PATCH] Setup for version 0.1.0 --- Project.toml | 3 +-- test/runtests.jl | 9 ++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 43d2edc..e1ffb1d 100644 --- a/Project.toml +++ b/Project.toml @@ -13,8 +13,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" julia = "1" [extras] -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "Random"] +test = ["Test"] diff --git a/test/runtests.jl b/test/runtests.jl index 243c6a7..9a25ba1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,4 @@ using Test -using Random using LightGraphs using PeriodicGraphs import PeriodicGraphs: ofs, vertex_permutation, LoopException @@ -8,6 +7,13 @@ import StaticArrays: SVector # using Aqua # Aqua.test_all(PeriodicGraphs) +@static if VERSION < v"1.4-" + function only(t) + length(t) == 1 || throw(ArgumentError("Not exactly 1 element")) + return t[1] + end +end + @testset "PeriodicVertex" begin @test_throws MethodError PeriodicVertex2D() # Always require a vertex identifier @test iszero(ofs(PeriodicVertex2D(1))) @@ -238,6 +244,7 @@ end @test collect(edges(g)) == edgs end + @testset "Neighbors" begin g = PeriodicGraph3D(1) @test add_vertices!(g, 2) == 2