summaryrefslogtreecommitdiff
path: root/Examples/test-suite/javascript/typedef_inherit_runme.js
blob: 7590e1e6ec8c108844793758d5eb1750738286f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var typedef_inherit = require("typedef_inherit");

a = new typedef_inherit.Foo();
b = new typedef_inherit.Bar();

x = typedef_inherit.do_blah(a);
if (x != "Foo::blah")
    print("Whoa! Bad return" + x);

x = typedef_inherit.do_blah(b);
if (x != "Bar::blah")
    print("Whoa! Bad return" + x);

c = new typedef_inherit.Spam();
d = new typedef_inherit.Grok();

x = typedef_inherit.do_blah2(c);
if (x != "Spam::blah")
    print("Whoa! Bad return" + x);

x = typedef_inherit.do_blah2(d);
if (x != "Grok::blah")
    print ("Whoa! Bad return" + x);