File: template_inherit_runme.ml

package info (click to toggle)
swig 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 42,876 kB
  • sloc: cpp: 61,013; ansic: 27,612; java: 14,670; python: 10,632; cs: 8,103; makefile: 6,287; yacc: 6,197; sh: 5,247; ruby: 5,172; perl: 3,541; php: 2,069; ml: 2,066; lisp: 1,894; javascript: 1,300; tcl: 1,091; xml: 115
file content (22 lines) | stat: -rw-r--r-- 936 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
open Swig
open Template_inherit

let _ =
  let a = new_FooInt '() and b = new_FooDouble '() and c = new_BarInt '()
  and d = new_BarDouble '() and e = new_FooUInt '() and f = new_BarUInt '() in
  assert (a -> blah () as string = "Foo");
  assert (b -> blah () as string = "Foo");
  assert (e -> blah () as string = "Foo");
  assert (c -> blah () as string = "Bar");
  assert (d -> blah () as string = "Bar");
  assert (f -> blah () as string = "Bar");
  assert (c -> foomethod () as string = "foomethod");
  assert (d -> foomethod () as string = "foomethod");
  assert (f -> foomethod () as string = "foomethod");
  assert (_invoke_blah_int '(a) as string = "Foo");
  assert (_invoke_blah_int '(c) as string = "Bar");
  assert (_invoke_blah_double '(b) as string = "Foo");
  assert (_invoke_blah_double '(d) as string = "Bar");
  assert (_invoke_blah_uint '(e) as string = "Foo");
  assert (_invoke_blah_uint '(f) as string = "Bar")
;;