~ubuntu-branches/ubuntu/quantal/vala-0.16/quantal

« back to all changes in this revision

Viewing changes to tests/objects/properties.vala

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2012-02-28 20:20:50 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120228202050-nowzcc7uhxomtrs2
Tags: 0.15.2-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
public delegate void Delegate ();
4
4
 
 
5
public struct RealStruct {
 
6
        public int field;
 
7
}
 
8
 
 
9
public class NonPrivAccess : Object {
 
10
        [NoAccessorMethod]
 
11
        public RealStruct real_struct { get; set; }
 
12
}
 
13
 
5
14
public class Sample : Object {
6
15
        private string automatic { get; set; }
7
16
 
62
71
        
63
72
                stdout.printf (" 3\n");
64
73
 
 
74
                var nonpriv = new NonPrivAccess ();
 
75
                nonpriv.real_struct = { 10 };
 
76
                assert (nonpriv.real_struct.field == 10);
 
77
 
65
78
                return 0;
66
79
        }
67
80
}