PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

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

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