Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-orbit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Katerina Roukounaki
cloud-orbit
Commits
d3f1cfdf
Commit
d3f1cfdf
authored
Nov 18, 2014
by
Yiannis Tsiouris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Test.Framework with HUnit for tests
parent
a94c0e8b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
.gitignore
.gitignore
+2
-0
Makefile
Makefile
+5
-1
Tests.hs
Tests.hs
+13
-7
No files found.
.gitignore
View file @
d3f1cfdf
...
...
@@ -2,3 +2,5 @@
*~
*.o
*.hi
orbit
OrbitTests
Makefile
View file @
d3f1cfdf
...
...
@@ -3,8 +3,12 @@
orbit
:
FORCE
ghc
--make
Bench.hs
-o
orbit
tests
:
orbit
ghc
-package
test-framework
-package
test-framework-hunit
\
-threaded
Tests.hs
-o
OrbitTests
clean
:
$(RM)
*
.swp
*
~
*
.hi
*
.o
distclean
:
clean
$(RM)
orbit
$(RM)
orbit
OrbitTests
Tests.hs
View file @
d3f1cfdf
import
Test.HUnit
import
Test.Framework
(
defaultMain
,
testGroup
)
import
Test.Framework.Providers.HUnit
import
Bench
(
seq
,
g13
,
g124
,
g1245
)
test1
=
TestCase
(
assertEqual
"g13 11"
"{size,10}"
(
Bench
.
seq
g13
11
))
test2
=
TestCase
(
assertEqual
"g124 157"
"{size,133}"
(
Bench
.
seq
g124
157
))
test3
=
TestCase
(
assertEqual
"g1245 157"
"{size,134}"
(
Bench
.
seq
g1245
157
))
main
=
defaultMain
tests
tests
=
TestList
[
TestLabel
"seq short"
test1
,
TestLabel
"seq medium"
test2
,
TestLabel
"seq long"
test3
tests
=
[
testGroup
"Sequential tests"
[
testCase
"short"
test1
,
testCase
"intermediate"
test2
,
testCase
"long"
test3
]
]
test1
=
assertEqual
"g13 11"
"{size,10}"
(
Bench
.
seq
g13
11
)
test2
=
assertEqual
"g124 157"
"{size,133}"
(
Bench
.
seq
g124
157
)
test3
=
assertEqual
"g1245 157"
"{size,134}"
(
Bench
.
seq
g1245
157
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment