-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into migrate-uts-2
- Loading branch information
Showing
22 changed files
with
208 additions
and
286 deletions.
There are no files selected for viewing
22 changes: 0 additions & 22 deletions
22
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_ABI_Attributes.cs
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_ABI_Safe.cs
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_Delegate.cs
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_DirectInit.cs
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_Extensions.cs
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_GoTo.cs
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_Params.cs
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_Property.cs
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
tests/Neo.Compiler.CSharp.UnitTests/OldEngine/UnitTest_Property_Method.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/Neo.Compiler.CSharp.UnitTests/UnitTest_ABI_Attributes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Neo.Json; | ||
using Neo.SmartContract.Testing; | ||
using System.Linq; | ||
|
||
namespace Neo.Compiler.CSharp.UnitTests | ||
{ | ||
[TestClass] | ||
public class UnitTest_ABI_Attributes | ||
{ | ||
[TestMethod] | ||
public void TestAbiAttributes() | ||
{ | ||
var permissions = new JArray(Contract_ABIAttributes.Manifest.Permissions.Select(p => p.ToJson()).ToArray()).ToString(false); | ||
Assert.AreEqual(@"[{""contract"":""0x0102030405060708090a0102030405060708090a"",""methods"":[""testArgs1"",""testVoid""]},{""contract"":""0x01ff00ff00ff00ff00ff00ff00ff00ff00ff00a4"",""methods"":[""a"",""b""]},{""contract"":""*"",""methods"":[""c""]}]", permissions); | ||
var trust = Contract_ABIAttributes.Manifest.Trusts.ToJson(p => p.ToJson()); | ||
Assert.AreEqual(@"[""0x0a0b00ff00ff00ff00ff00ff00ff00ff00ff00a4""]", trust.ToString(false)); | ||
} | ||
} | ||
} |
8 changes: 3 additions & 5 deletions
8
...UnitTests/OldEngine/UnitTest_ABI_Event.cs → ...er.CSharp.UnitTests/UnitTest_ABI_Event.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Neo.SmartContract.Testing; | ||
|
||
namespace Neo.Compiler.CSharp.UnitTests | ||
{ | ||
[TestClass] | ||
public class UnitTest_ABI_Safe | ||
{ | ||
[TestMethod] | ||
public void UnitTest_TestSafe() | ||
{ | ||
Assert.IsFalse(Contract_ABISafe.Manifest.Abi.Methods[0].Safe); | ||
Assert.IsTrue(Contract_ABISafe.Manifest.Abi.Methods[1].Safe); | ||
Assert.IsFalse(Contract_ABISafe.Manifest.Abi.Methods[2].Safe); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Neo.SmartContract.Testing; | ||
using Neo.SmartContract.Testing.TestingStandards; | ||
|
||
namespace Neo.Compiler.CSharp.UnitTests | ||
{ | ||
[TestClass] | ||
public class UnitTest_Delegate : TestBase<Contract_Delegate> | ||
{ | ||
public UnitTest_Delegate() : base(Contract_Delegate.Nef, Contract_Delegate.Manifest) { } | ||
|
||
[TestMethod] | ||
public void TestFunc() | ||
{ | ||
Assert.AreEqual(5, Contract.SumFunc(2, 3)); | ||
} | ||
} | ||
} |
Oops, something went wrong.