changeset 218:03375aa30edd package_refactor

Add Tests and exports to RegionIndices
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Jun 2019 12:57:20 +0200
parents 4c62d0253bd4
children 69a6049e14d9
files RegionIndices/Project.toml RegionIndices/src/RegionIndices.jl RegionIndices/test/runtests.jl
diffstat 3 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r 4c62d0253bd4 -r 03375aa30edd RegionIndices/Project.toml
--- a/RegionIndices/Project.toml	Wed Jun 26 12:55:01 2019 +0200
+++ b/RegionIndices/Project.toml	Wed Jun 26 12:57:20 2019 +0200
@@ -2,3 +2,9 @@
 uuid = "5d527584-97f1-11e9-084c-4540c7ecf219"
 authors = ["Jonatan Werpers <jonatan.werpers@it.uu.se>"]
 version = "0.1.0"
+
+[extras]
+Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
+
+[targets]
+test = ["Test"]
diff -r 4c62d0253bd4 -r 03375aa30edd RegionIndices/src/RegionIndices.jl
--- a/RegionIndices/src/RegionIndices.jl	Wed Jun 26 12:55:01 2019 +0200
+++ b/RegionIndices/src/RegionIndices.jl	Wed Jun 26 12:57:20 2019 +0200
@@ -6,6 +6,8 @@
 struct Upper    <: Region end
 struct Unknown  <: Region end
 
+export Region, Interior, Lower, Upper, Unknown
+
 struct Index{R<:Region, T<:Integer}
     i::T
 
@@ -15,6 +17,8 @@
     Index(t::Tuple{T, DataType}) where {R<:Region,T<:Integer} = Index{t[2],T}(t[1]) # TBD: This is not very specific in what types are allowed in t[2]. Can this be fixed?
 end
 
+export Index
+
 # Index(R::Type{<:Region}) = Index{R}
 
 ## Vill kunna skriva
@@ -32,6 +36,7 @@
 end
 
 IndexTuple(t::Vararg{Tuple{T, DataType}}) where T<:Integer = Index.(t)
+export IndexTuple
 
 # TODO: Use the values of the region structs, e.g. Lower(), for the region parameter instead of the types.
 # For example the following works:
diff -r 4c62d0253bd4 -r 03375aa30edd RegionIndices/test/runtests.jl
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RegionIndices/test/runtests.jl	Wed Jun 26 12:57:20 2019 +0200
@@ -0,0 +1,4 @@
+using RegionIndices
+using Test
+
+@test_broken false