Skip to content

Commit

Permalink
Migrate unit tests (#1036)
Browse files Browse the repository at this point in the history
* Migrate 5 unit tests

* format

* Update nuget

---------

Co-authored-by: Jimmy <jimmy@r3e.network>
  • Loading branch information
shargon and Jim8y committed May 7, 2024
1 parent 93eaf90 commit f346235
Show file tree
Hide file tree
Showing 15 changed files with 295 additions and 553 deletions.
2 changes: 1 addition & 1 deletion src/Neo.Compiler.CSharp/CompilationEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public List<CompilationContext> CompileSources(params string[] sourceFiles)
{
return CompileSources(new CompilationSourceReferences()
{
Packages = new (string, string)[] { new("Neo.SmartContract.Framework", "3.6.2-CI00554") }
Packages = [new("Neo.SmartContract.Framework", "3.6.2-CI00581")]
},
sourceFiles);
}
Expand Down
6 changes: 2 additions & 4 deletions tests/Neo.Compiler.CSharp.TestContracts/Contract_Attribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ namespace Neo.Compiler.CSharp.TestContracts
{
public class SampleAttribute : System.Attribute { }

[DisplayName("attr")]
public abstract class Attr : SmartContract.Framework.SmartContract { }

public class Contract_Attribute : Attr
[DisplayName("Contract_AttributeChanged")]
public class Contract_Attribute : SmartContract.Framework.SmartContract
{
[Sample]
public static bool test() => true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ namespace Neo.Compiler.CSharp.TestContracts
{
public class Contract_BigInteger : SmartContract.Framework.SmartContract
{
public static object TestPow(BigInteger x, int y)
public static BigInteger TestPow(BigInteger x, int y)
{
return BigInteger.Pow(x, y);
}

public static object TestSqrt(BigInteger x)
public static BigInteger TestSqrt(BigInteger x)
{
return x.Sqrt();
}
Expand Down

This file was deleted.

Loading

0 comments on commit f346235

Please sign in to comment.