Skip to content

Add UT for callback function with arguments#269

Closed
ProDog wants to merge 3 commits intoneo-project:masterfrom
ProDog:add-callback
Closed

Add UT for callback function with arguments#269
ProDog wants to merge 3 commits intoneo-project:masterfrom
ProDog:add-callback

Conversation

@ProDog
Copy link
Copy Markdown
Contributor

@ProDog ProDog commented May 15, 2020

Link #262 (comment)

Add UT for callback function with arguments.

@ProDog ProDog mentioned this pull request May 15, 2020

public static Func<byte[], BigInteger> CreateFuncPointerWithArg()
{
return new Func<byte[], BigInteger>(num => MyMethodWithArg(num));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you take a look @lightszero It seems that it produce different names

System.Func`2<System.Byte[],System.Numerics.BigInteger> Neo.Compiler.MSIL.TestClasses.Contract_Pointers::CreateFuncPointerWithArg()
System.Func`2<System.Byte[],System.Numerics.BigInteger> Neo.Compiler.MSIL.TestClasses.Contract_Pointers/<>c::<>9__3_0

If we replace it by

 public static Func<byte[], BigInteger> CreateFuncPointerWithArg()
        {
            return new Func<byte[], BigInteger>(MyMethodWithArg);
        }

It throw a different error.

@ShawnYun ShawnYun mentioned this pull request Jun 11, 2020
@ShawnYun
Copy link
Copy Markdown
Contributor

Could we close it now ?

@erikzhang erikzhang closed this Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants