vala-tests r19 - trunk/tests/bugs



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

Log:
Added test case for bug 536863

Added:
   trunk/tests/bugs/536863.test   (contents, props changed)
   trunk/tests/bugs/536863.vala

Added: trunk/tests/bugs/536863.test
==============================================================================
--- (empty file)
+++ trunk/tests/bugs/536863.test	Sat Oct 18 11:13:17 2008
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+SRCDIR=../tests/bugs
+
+if [ "x$VALAC" = "x" ] ; then
+  VALAC=valac
+  SRCDIR=.
+fi
+
+TESTNAME=`basename $0 .test`
+
+$VALAC -o $TESTNAME $SRCDIR/$TESTNAME.vala $VALAFLAGS
+
+G_DEBUG=fatal_warnings ./$TESTNAME  $@

Added: trunk/tests/bugs/536863.vala
==============================================================================
--- (empty file)
+++ trunk/tests/bugs/536863.vala	Sat Oct 18 11:13:17 2008
@@ -0,0 +1,36 @@
+using GLib;
+
+public class Foo : Object {
+        public int property {
+                get; set;
+        }
+        
+        public string get_name () {
+                return "Foo";
+        }
+}
+
+public interface Foobar {
+        public abstract int property {
+                get; set;
+        }
+        
+        public abstract string get_name ();
+}
+
+
+public class Bar : Foo, Foobar {
+
+        public string another_property {
+                get; set;
+        }
+
+}
+
+public static void main ( string[] args ) {
+        Bar b = new Bar ();
+        b.property = 3;
+        assert(b.property == 3);
+        assert(b.get_name () == "Foo");
+}
+



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