[Swift-commit] r4253 - trunk/tests/functions
wozniak at ci.uchicago.edu
wozniak at ci.uchicago.edu
Mon Apr 4 08:53:29 CDT 2011
Author: wozniak
Date: 2011-04-04 08:53:29 -0500 (Mon, 04 Apr 2011)
New Revision: 4253
Added:
trunk/tests/functions/105-assert-loop.check.sh
trunk/tests/functions/105-assert-loop.swift
Log:
More complex assert test
Added: trunk/tests/functions/105-assert-loop.check.sh
===================================================================
--- trunk/tests/functions/105-assert-loop.check.sh (rev 0)
+++ trunk/tests/functions/105-assert-loop.check.sh 2011-04-04 13:53:29 UTC (rev 4253)
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -x
+
+grep I_IS_4 stdout.txt || exit 1
+
+LINES=$( grep -c "i:" stdout.txt )
+[[ ${LINES} == 5 ]] || exit 1
+
+exit 0
Property changes on: trunk/tests/functions/105-assert-loop.check.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/tests/functions/105-assert-loop.swift
===================================================================
--- trunk/tests/functions/105-assert-loop.swift (rev 0)
+++ trunk/tests/functions/105-assert-loop.swift 2011-04-04 13:53:29 UTC (rev 4253)
@@ -0,0 +1,8 @@
+
+// THIS-SCRIPT-SHOULD-FAIL
+
+foreach i in [1:5]
+{
+ tracef("i: %i\n", i);
+ assert(i != 4, "I_IS_4");
+}
More information about the Swift-commit
mailing list