diff options
author | Joe Crayne <joe@jerkface.net> | 2019-06-11 01:02:56 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-06-11 01:10:22 -0400 |
commit | 254c7813344075b6a2c915d9724a5e7a18091b87 (patch) | |
tree | 1e817f71bd1034377f44092e360def575e2dafc3 /test/TestSundqvist.hs | |
parent | 6fddb0f2c9f60714089389350e001f6f765d2405 (diff) |
Added failing tests.
Diffstat (limited to 'test/TestSundqvist.hs')
-rw-r--r-- | test/TestSundqvist.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/TestSundqvist.hs b/test/TestSundqvist.hs new file mode 100644 index 0000000..bfcad6b --- /dev/null +++ b/test/TestSundqvist.hs | |||
@@ -0,0 +1,21 @@ | |||
1 | module TestSundqvist where | ||
2 | |||
3 | |||
4 | import Graphics.WaveFront | ||
5 | import Graphics.WaveFront.Load as Load | ||
6 | import System.Directory | ||
7 | import System.IO | ||
8 | |||
9 | getDataDir :: IO FilePath | ||
10 | getDataDir = do | ||
11 | let tryDir d fallback = do | ||
12 | found <- doesDirectoryExist d | ||
13 | if found then return d else fallback | ||
14 | tryDir "./test-data" $ tryDir "../test-data" (return ".") | ||
15 | |||
16 | main = do | ||
17 | ddir <- getDataDir | ||
18 | r1 <- Load.obj (ddir ++ "/01.obj") | ||
19 | print r1 | ||
20 | -- Failed: endOfInput | ||
21 | -- Reason: vt has 3 components instead of 2. | ||