public static int Main (string[] args)
		{
			GLib.GType.Init ();
			TestObject obj = new TestObject ();
			GLib.Value val = new GLib.Value (42);
			obj.SetProperty ("my_prop", val);
			val.Dispose ();
			if (obj.MyProp != 42) {
				Console.Error.WriteLine ("Property setter did not run.");
				return 1;
			}
			GLib.Value val2 = obj.GetProperty ("my_prop");
			if ((int)val2.Val != 42) {
				Console.Error.WriteLine ("Property set/get roundtrip failed.");
				return 1;
			}
			Console.WriteLine ("Round trip succeeded.");
			return 0;
		}
Exemplo n.º 2
0
		public static int Main13 (string[] args)
		{
			GLib.GType.Init ();
			TestObject obj = new TestObject ();
			obj.TestInt ();
			obj.TestUInt ();
			obj.TestLong ();
			obj.TestULong ();
			obj.TestByte ();
			obj.TestSByte ();
			obj.TestBool ();
			obj.TestFloat ();
			obj.TestDouble ();
			obj.TestString ();
			//obj.TestIntPtr ();
			//obj.TestBoxed ();
			obj.TestGObject ();
			Console.WriteLine ("All properties succeeded.");
			return 0;
		}