diff --git a/hs2ats.cabal b/hs2ats.cabal
--- a/hs2ats.cabal
+++ b/hs2ats.cabal
@@ -1,6 +1,6 @@
 cabal-version: 1.18
 name: hs2ats
-version: 0.2.1.9
+version: 0.2.1.10
 license: BSD3
 license-file: LICENSE
 copyright: Copyright: (c) 2018 Vanessa McHale
@@ -12,6 +12,9 @@
     This package enables scanning Haskell source files for data types and then generating [ATS](http://www.ats-lang.org/) types from them.
 category: Language, Haskell, ATS
 build-type: Simple
+extra-source-files:
+  test/data/*.hs
+  test/data/*.out
 
 source-repository head
     type: git
diff --git a/test/data/HigherOrder.hs b/test/data/HigherOrder.hs
new file mode 100644
--- /dev/null
+++ b/test/data/HigherOrder.hs
@@ -0,0 +1,4 @@
+data GenericSum a b = GenericL a
+                    | GenericR b
+
+newtype GenericSumInt = GenericSumInt (GenericSum String Int)
diff --git a/test/data/HigherOrder.out b/test/data/HigherOrder.out
new file mode 100644
--- /dev/null
+++ b/test/data/HigherOrder.out
@@ -0,0 +1,5 @@
+datavtype generic_sum(a: vt@ype, b: vt@ype) =
+  | Generic_l of a
+  | Generic_r of b
+
+vtypedef generic_sum_int = generic_sum(Strptr1, int)
diff --git a/test/data/Newtype.hs b/test/data/Newtype.hs
new file mode 100644
--- /dev/null
+++ b/test/data/Newtype.hs
@@ -0,0 +1,3 @@
+module Newtype where
+
+newtype IntType = IntType Int
diff --git a/test/data/Newtype.out b/test/data/Newtype.out
new file mode 100644
--- /dev/null
+++ b/test/data/Newtype.out
@@ -0,0 +1,1 @@
+vtypedef int_type = int
diff --git a/test/data/Option.hs b/test/data/Option.hs
new file mode 100644
--- /dev/null
+++ b/test/data/Option.hs
@@ -0,0 +1,4 @@
+module Option where
+
+data Option a = Some a
+              | None
diff --git a/test/data/Option.out b/test/data/Option.out
new file mode 100644
--- /dev/null
+++ b/test/data/Option.out
@@ -0,0 +1,3 @@
+datavtype option(a: vt@ype) =
+  | Some of a
+  | None
diff --git a/test/data/Pair.hs b/test/data/Pair.hs
new file mode 100644
--- /dev/null
+++ b/test/data/Pair.hs
@@ -0,0 +1,3 @@
+module Pair where
+
+data Pair = Pair { first :: Int, second :: Int }
diff --git a/test/data/Pair.out b/test/data/Pair.out
new file mode 100644
--- /dev/null
+++ b/test/data/Pair.out
@@ -0,0 +1,1 @@
+vtypedef pair = @{ first = int, second = int }
diff --git a/test/data/SumType.hs b/test/data/SumType.hs
new file mode 100644
--- /dev/null
+++ b/test/data/SumType.hs
@@ -0,0 +1,4 @@
+module SumType where
+
+data Num = FloatNum Float
+         | IntNum Int
diff --git a/test/data/SumType.out b/test/data/SumType.out
new file mode 100644
--- /dev/null
+++ b/test/data/SumType.out
@@ -0,0 +1,3 @@
+datavtype num =
+  | Float_num of float
+  | Int_num of int
