vala-tests r31 - trunk/tests/bugs



Author: malureau
Date: Sat Oct 18 19:13:56 2008
New Revision: 31
URL: http://svn.gnome.org/viewvc/vala-tests?rev=31&view=rev

Log:
Add 435854 bug test

Added:
   trunk/tests/bugs/435854.test   (contents, props changed)
   trunk/tests/bugs/435854.vala
Modified:
   trunk/tests/bugs/update.sh

Added: trunk/tests/bugs/435854.test
==============================================================================
--- (empty file)
+++ trunk/tests/bugs/435854.test	Sat Oct 18 19:13:56 2008
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+set -e
+
+SRCDIR=../tests/bugs
+
+if [ "x$VALAC" = "x" ] ; then
+  VALAC=valac
+  SRCDIR=.
+fi
+
+while true ; do
+    case "$1" in
+	--interact) INTERACT=1 ; shift ;;
+	--) shift ; break ;;
+	*) break ;;
+    esac
+done
+
+TESTNAME=`basename $0 .test`
+
+!  $VALAC  -o $TESTNAME $SRCDIR/$TESTNAME.vala  -C $VALAFLAGS
+
+if [ "$?" != "0" ] && [ -n ! ]; then
+  echo ""
+  echo "*** WARNING: This vala test was expecting to fail ***"
+  echo ""
+  echo "Visit bug: http://bugzilla.gnome.org/show_bug.cgi?id=435854";
+  exit 1
+fi
+
+true || exit 1
+
+if [ "xno" = "x1" -o "x$INTERACT" = "x1" ] ; then
+  G_DEBUG=fatal_warnings ./$TESTNAME  $@
+else
+  echo ""
+  [ "xno" = "x0" ] && echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+  [ "xno" = "xno" ] && rm -rf 435854.o
+fi
+

Added: trunk/tests/bugs/435854.vala
==============================================================================
--- (empty file)
+++ trunk/tests/bugs/435854.vala	Sat Oct 18 19:13:56 2008
@@ -0,0 +1,11 @@
+using GLib;
+
+public interface Something {
+	public abstract void do_something_else(out Error err);
+
+	public void do_something(out Error err) {
+		/* should have used 'err' here but used 'error' */
+		do_something_else(ref error);
+	}
+}
+

Modified: trunk/tests/bugs/update.sh
==============================================================================
--- trunk/tests/bugs/update.sh	(original)
+++ trunk/tests/bugs/update.sh	Sat Oct 18 19:13:56 2008
@@ -21,6 +21,7 @@
 434503
 434514
 435853
+435854
 "
 
 set -e
@@ -81,6 +82,7 @@
 [ "$test" = "433290" ] && TESTEXPECT="! grep -i my 433290.h" VALAFLAGS="$VALAFLAGS -C"
 [ "$test" = "434515" ] && VALAFLAGS="$VALAFLAGS -D WITH_TEST"
 [ "$test" = "435848" ] && VALAFLAGS="$VALAFLAGS -X -Wall"
+[ "$test" = "435854" ] && VALAFLAGS="$VALAFLAGS -C"
 
 BUGZILLA="http://bugzilla.gnome.org/show_bug.cgi?id=$test";
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]