vala-tests r37 - trunk/tests/bugs
- From: malureau svn gnome org
- To: svn-commits-list gnome org
- Subject: vala-tests r37 - trunk/tests/bugs
- Date: Sat, 18 Oct 2008 21:08:12 +0000 (UTC)
Author: malureau
Date: Sat Oct 18 21:08:12 2008
New Revision: 37
URL: http://svn.gnome.org/viewvc/vala-tests?rev=37&view=rev
Log:
Add bug 437434 test
Added:
trunk/tests/bugs/437434.test (contents, props changed)
trunk/tests/bugs/437434.vala
Added: trunk/tests/bugs/437434.test
==============================================================================
--- (empty file)
+++ trunk/tests/bugs/437434.test Sat Oct 18 21:08:12 2008
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+set -e
+
+SRCDIR=../tests/bugs
+
+if [ "x$VALAC" = "x" ] ; then
+ VALAC=valac
+ SRCDIR=`dirname $0`
+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 $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=437434"
+ exit 1
+fi
+
+true || exit 1
+
+if [ "x1" = "x1" -o "x$INTERACT" = "x1" ] ; then
+ G_DEBUG=fatal_warnings ./$TESTNAME $@
+else
+ echo ""
+ [ "x1" = "x0" ] && echo "*** WARNING: This vala test is interactive and will not be run (try --interact) ***"
+ [ "x1" = "xno" ] && rm -rf 437434.o
+fi
+
Added: trunk/tests/bugs/437434.vala
==============================================================================
--- (empty file)
+++ trunk/tests/bugs/437434.vala Sat Oct 18 21:08:12 2008
@@ -0,0 +1,15 @@
+class Test: Object {
+ [Description (nick = "foo", blurb = "bar")]
+ public string test { get; set; default = "baz"; }
+
+ public static int main () {
+ var t = new Test ();
+
+ assert (t.test == "baz");
+
+ var spec = ((ObjectClass)typeof (Test).class_peek ()).find_property ("test");
+ // var spec = (typeof (Test).class_peek () as ObjectClass).find_property ("test");
+
+ return (spec.get_blurb () == "bar" && spec.get_nick () == "foo") ? 0 : 1;
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]