summaryrefslogtreecommitdiff
path: root/test/files/run/Course-2002-07.check
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-03-20 14:09:38 +0000
committerpaltherr <paltherr@epfl.ch>2003-03-20 14:09:38 +0000
commit1bb9e69a30297f142353f256e97e379ba615f68a (patch)
treec44432b491ee3eab864e9cf0f31cea5e27bdd229 /test/files/run/Course-2002-07.check
parent644e5bdf878a3fb37b65d3a6578387a83d4c0ab4 (diff)
downloadscala-1bb9e69a30297f142353f256e97e379ba615f68a.tar.gz
scala-1bb9e69a30297f142353f256e97e379ba615f68a.tar.bz2
scala-1bb9e69a30297f142353f256e97e379ba615f68a.zip
- Added test file Course-2002-07.scala
Diffstat (limited to 'test/files/run/Course-2002-07.check')
-rw-r--r--test/files/run/Course-2002-07.check102
1 files changed, 102 insertions, 0 deletions
diff --git a/test/files/run/Course-2002-07.check b/test/files/run/Course-2002-07.check
new file mode 100644
index 0000000000..d2e92a6463
--- /dev/null
+++ b/test/files/run/Course-2002-07.check
@@ -0,0 +1,102 @@
+ 0 = 0
+ 1 = 1
+ 0 + 1 = 1
+ 1 + 2 = 3
+2 + 3 + 4 = 9
+
+ 0 = 0
+ 1 = 1
+ 0 + 1 = 1
+ 1 + 2 = 3
+2 + 3 + 4 = 9
+
+ 0 = 0
+ 1 = 1
+ 0 + 1 = 1
+ 1 + 2 = 3
+2 + 3 + 4 = 9
+
+ 0 = 0
+ 1 = 1
+ 0 + 1 = 1
+ 1 + 2 = 3
+2 + 3 + 4 = 9
+
+[] = concat([])
+[] = concat([[]])
+[] = concat([[],[]])
+[] = concat([[],[],[]])
+[1,2,3,4,5,6] = concat([[1,2,3,4,5,6]])
+[1,2,3,4,5,6] = concat([[1,2,3,4,5,6],[]])
+[1,2,3,4,5,6] = concat([[1,2,3],[4,5,6]])
+[1,2,3,4,5,6] = concat([[],[1,2,3,4,5,6]])
+[1,2,3,4,5,6] = concat([[1,2,3,4,5,6],[],[]])
+[1,2,3,4,5,6] = concat([[1,2,3,4,5],[6],[]])
+[1,2,3,4,5,6] = concat([[1,2,3],[4,5,6],[]])
+[1,2,3,4,5,6] = concat([[1],[2,3,4,5,6],[]])
+[1,2,3,4,5,6] = concat([[],[1,2,3,4,5,6],[]])
+[1,2,3,4,5,6] = concat([[],[1,2,3,4,5],[6]])
+[1,2,3,4,5,6] = concat([[],[1,2,3],[4,5,6]])
+[1,2,3,4,5,6] = concat([[],[1],[2,3,4,5,6]])
+[1,2,3,4,5,6] = concat([[],[],[1,2,3,4,5,6]])
+[1,2,3,4,5,6] = concat([[1,2],[3,4],[5,6]])
+
+[] = zipFun([],[])
+[] = zipFun([],[a,b,c])
+[] = zipFun([1,2,3],[])
+[(1,a)] = zipFun([1],[a])
+[(1,a)] = zipFun([1],[a,b,c])
+[(1,a)] = zipFun([1,2,3],[a])
+[(1,a),(2,b)] = zipFun([1,2],[a,b])
+[(1,a),(2,b)] = zipFun([1,2],[a,b,c])
+[(1,a),(2,b)] = zipFun([1,2,3],[a,b])
+[(1,a),(2,b),(3,c)] = zipFun([1,2,3],[a,b,c])
+
+[] = heads([])
+[] = heads([[]])
+[] = heads([[],[]])
+[] = heads([[],[],[]])
+[1] = heads([[1,2,3,4,5,6]])
+[1] = heads([[1,2,3,4,5,6],[]])
+[1] = heads([[],[1,2,3,4,5,6]])
+[1] = heads([[1,2,3,4,5,6],[],[]])
+[1] = heads([[],[1,2,3,4,5,6],[]])
+[1] = heads([[],[],[1,2,3,4,5,6]])
+[1,2] = heads([[1],[2,3,4,5,6],[]])
+[1,2] = heads([[],[1],[2,3,4,5,6]])
+[1,4] = heads([[1,2,3],[4,5,6]])
+[1,4] = heads([[1,2,3],[4,5,6],[]])
+[1,4] = heads([[],[1,2,3],[4,5,6]])
+[1,6] = heads([[1,2,3,4,5],[6],[]])
+[1,6] = heads([[],[1,2,3,4,5],[6]])
+[1,3,5] = heads([[1,2],[3,4],[5,6]])
+
+[] = heads([])
+[] = heads([[]])
+[] = heads([[],[]])
+[] = heads([[],[],[]])
+[1] = heads([[1,2,3,4,5,6]])
+[1] = heads([[1,2,3,4,5,6],[]])
+[1] = heads([[],[1,2,3,4,5,6]])
+[1] = heads([[1,2,3,4,5,6],[],[]])
+[1] = heads([[],[1,2,3,4,5,6],[]])
+[1] = heads([[],[],[1,2,3,4,5,6]])
+[1,2] = heads([[1],[2,3,4,5,6],[]])
+[1,2] = heads([[],[1],[2,3,4,5,6]])
+[1,4] = heads([[1,2,3],[4,5,6]])
+[1,4] = heads([[1,2,3],[4,5,6],[]])
+[1,4] = heads([[],[1,2,3],[4,5,6]])
+[1,6] = heads([[1,2,3,4,5],[6],[]])
+[1,6] = heads([[],[1,2,3,4,5],[6]])
+[1,3,5] = heads([[1,2],[3,4],[5,6]])
+
+f (x) = Prod(Var(x), Var(x))
+f'(x) = Sum(Prod(Var(x), Number(1)), Prod(Var(x), Number(1)))
+
+f (x) = x * x
+f'(x) = x * 1 + x * 1
+g (x) = 2 * x * x + 3 * x
+g'(x) = 2 * x * 1 + x * (2 * 1 + x * 0) + 3 * 1 + x * 0
+g (3) = 27
+g'(3) = 15
+