summaryrefslogtreecommitdiff
path: root/Examples/test-suite/d/pointer_reference_runme.1.d
blob: c593b939c8aa7a68f56ad4713c5adbc84956371e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module pointer_reference_runme;

import pointer_reference.pointer_reference;
import pointer_reference.Struct;

void main() {
  Struct s  = get();
  if (s.value != 10) throw new Exception("get test failed");

  Struct ss = new Struct(20);
  set(ss);
  if (Struct.instance.value != 20) throw new Exception("set test failed");
}