PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/d/pointer_reference_runme.1.d

#
D | 13 lines | 10 code | 3 blank | 0 comment | 4 complexity | 4aab06dc498d79fd8589e11103dbbe58 MD5 | raw file
 1module pointer_reference_runme;
 2
 3import pointer_reference.pointer_reference;
 4import pointer_reference.Struct;
 5
 6void main() {
 7  Struct s  = get();
 8  if (s.value != 10) throw new Exception("get test failed");
 9
10  Struct ss = new Struct(20);
11  set(ss);
12  if (Struct.instance.value != 20) throw new Exception("set test failed");
13}