Skip to content

Commit

Permalink
Test that method invocation issue is fixed
Browse files Browse the repository at this point in the history
Closes #67
  • Loading branch information
peterwvj committed Feb 1, 2017
1 parent 24d5774 commit ef9e9df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Expand Up @@ -51,4 +51,9 @@ TEST(Class_StaticMethodAccess, localfn)
TEST(Class_StaticMethodAccess, funcInstantiation)
{
CHECK(CLASS_ClassFunCall__Z17funcInstantiationEV);
}
}

TEST(Class_StaticMethodAccess, twoParamFun)
{
CHECK(CLASS_ClassFunCall__Z11twoParamFunEV);
}
19 changes: 12 additions & 7 deletions core/vdm2c/src/test/resources/vdmrt/classes/ClassFun.vdmrt
Expand Up @@ -16,18 +16,23 @@ end ClassFun
class ClassFunCall

functions
public fn : () -> bool
fn() == false;
public fn : () -> bool
fn() == false;

public externalfn : () -> bool
public externalfn : () -> bool
externalfn() == ClassFun`fn();

public localfn : () -> bool
localfn() == fn();
public localfn : () -> bool
localfn() == fn();

public funcInstantiation : () -> bool
public funcInstantiation : () -> bool
funcInstantiation () == ClassFun`typeParamsFn[nat]();


private condfun : int * int -> bool
condfun(a,b) == a + b = 3;

public twoParamFun: () -> bool
twoParamFun() == condfun(1,2)

operations
public op: () ==> bool
Expand Down

0 comments on commit ef9e9df

Please sign in to comment.