Add two Javascript testcases converted from Python

This commit is contained in:
William S Fulton 2021-03-11 08:16:44 +00:00
commit 9739be60d0
2 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,19 @@
var inherit_missing = require("inherit_missing");
a = inherit_missing.new_Foo()
b = new inherit_missing.Bar()
c = new inherit_missing.Spam()
x = inherit_missing.do_blah(a)
if (x != "Foo::blah")
throw new Error("Whoa! Bad return {}".format(x))
x = inherit_missing.do_blah(b)
if (x != "Bar::blah")
throw new Error("Whoa! Bad return {}".format(x))
x = inherit_missing.do_blah(c)
if (x != "Spam::blah")
throw new Error("Whoa! Bad return {}".format(x))
inherit_missing.delete_Foo(a)

View file

@ -0,0 +1,8 @@
var virtual_derivation = require("virtual_derivation");
//
// very innocent example
//
b = new virtual_derivation.B(3)
if (b.get_a() != b.get_b())
throw new Error("something is really wrong")