From 1bb9e69a30297f142353f256e97e379ba615f68a Mon Sep 17 00:00:00 2001 From: paltherr Date: Thu, 20 Mar 2003 14:09:38 +0000 Subject: - Added test file Course-2002-07.scala --- test/files/run/Course-2002-07.check | 102 ++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 test/files/run/Course-2002-07.check (limited to 'test/files/run/Course-2002-07.check') 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 + -- cgit v1.2.3