DependencyGraphTest0001
structure DependencyGraphTest0001 =
struct
structure Assert = SMLUnit.Assert
structure Test = SMLUnit.Test
structure Testee = DependencyGraph
val assertEqualIsDependsOn
val testDependsOn0001
val testDependsOn0002
val testDependsOn0003
val testGetClosure1001
val testGetClosure2001
val testGetClosure2002
val testGetClosure2003
val testGetClosure3001
val testGetClosure3002
val testGetClosure4001
val testGetClosureRev1001
val testGetClosureRev2001
val testGetClosureRev2002
val testGetClosureRev2003
val testGetClosureRev3001
val testGetClosureRev3002
val testGetClosureRev4001
val testSort1001
val testSort1002
val testSort2001
val testSort2002
val testSort3001
val testSort3002
val testSort3003
val suite
end
-
unit test of
structure DependencyGraph
-
assertEqualIsDependsOn
val assertEqualIsDependsOn
testDependsOn0001
val testDependsOn0001
-
test case of dependsOn/isDependsOn (normal case)
- calls dependsOn.
- calls isDependsOn and verifies the return value indicates that
there is a dependency with the attribute between the specified
nodes.
-
testDependsOn0002
val testDependsOn0002
-
test case of dependsOn/isDependsOn (normal case)
- calls isDependsOn and verifies the return value indicates that
there is no dependency with the attribute between the specified
nodes.
-
testDependsOn0003
val testDependsOn0003
-
test case of dependsOn/isDependsOn (normal case)
- calls dependsOn.
- calls isDependsOn and verifies the return value indicates that
there is a dependency with the attribute between the specified
nodes.
- calls isDependsOn with src and destination reversed
and verifies the return value indicates that
there is no dependency of the opposite direction between the
specified nodes.
-
testGetClosure1001
val testGetClosure1001
-
tests the getClosure function with a node graph.
- the number of nodes: 1
- the length of dependency path: 0
- the number of dependency path: 0
-
testGetClosure2001
val testGetClosure2001
-
tests the getClosure function with two nodes graph where is no
dependency.
- the number of nodes: 2
- the length of dependency path: 0
- the number of dependency path: 0
-
testGetClosure2002
val testGetClosure2002
-
tests the getClosure function with two nodes graph where is a
dependency.
- the number of nodes: 2
- the length of dependency path: 1
- the number of dependency path: 1
-
testGetClosure2003
val testGetClosure2003
-
tests the getClosure function with two nodes graph which are mutual
dependencies between the nodes.
- the number of nodes: 2
- the length of dependency path: 1
- the number of dependency path: 2
-
testGetClosure3001
val testGetClosure3001
-
tests the getClosure function with three nodes graph.
- the number of nodes: 3
- the length of dependency path: 1
- the number of dependency path: 1
-
testGetClosure3002
val testGetClosure3002
-
tests the getClosure function with three nodes graph.
- the number of nodes: 3
- the length of dependency path: 2
- the number of dependency path: 1
-
testGetClosure4001
val testGetClosure4001
-
tests the getClosure function with four nodes graph.
- the number of nodes: 4
- the length of dependency path: 2
- the number of dependency path: 2
-
testGetClosureRev1001
val testGetClosureRev1001
-
tests the getClosureRev function with a node graph.
- the number of nodes: 1
- the length of dependency path: 0
- the number of dependency path: 0
-
testGetClosureRev2001
val testGetClosureRev2001
-
tests the getClosureRev function with two nodes graph where is no
dependency.
- the number of nodes: 2
- the length of dependency path: 0
- the number of dependency path: 0
-
testGetClosureRev2002
val testGetClosureRev2002
-
tests the getClosureRev function with two nodes graph where is a
dependency.
- the number of nodes: 2
- the length of dependency path: 1
- the number of dependency path: 1
-
testGetClosureRev2003
val testGetClosureRev2003
-
tests the getClosureRev function with two nodes graph which are mutual
dependencies between the nodes.
- the number of nodes: 2
- the length of dependency path: 1
- the number of dependency path: 2
-
testGetClosureRev3001
val testGetClosureRev3001
-
tests the getClosureRev function with three nodes graph.
- the number of nodes: 3
- the length of dependency path: 1
- the number of dependency path: 1
-
testGetClosureRev3002
val testGetClosureRev3002
-
tests the getClosureRev function with three nodes graph.
- the number of nodes: 3
- the length of dependency path: 2
- the number of dependency path: 1
-
testGetClosureRev4001
val testGetClosureRev4001
-
tests the getClosureRev function with four nodes graph.
- the number of nodes: 4
- the length of dependency path: 2
- the number of dependency path: 2
-
testSort1001
val testSort1001
-
tests the sort function with a nodes graph without any dependency.
-
testSort1002
val testSort1002
-
tests the sort function with a nodes graph depending itself.
-
testSort2001
val testSort2001
-
tests the sort function with a two nodes graph where a nodes depends on
the other node.
-
testSort2002
val testSort2002
-
tests the sort function with a two nodes graph where they depend on
each other.
The order of nodes in the result value of the sort function is not
defined if they depend each other, but the function must return some
value (not stuck).
-
testSort3001
val testSort3001
-
tests the sort function with a three nodes graph where two nodes depend
the other node.
-
testSort3002
val testSort3002
-
tests the sort function with a three nodes graph where a node depends
the other two nodes.
-
testSort3003
val testSort3003
-
tests the sort function with a three nodes graph where a node depends
the other two nodes of which the one node depends the other node.
-
suite
val suite