From 0658f70ccd017cc427b5ba4516ee664a32de59aa Mon Sep 17 00:00:00 2001 From: Fernando Diaz Toledano Date: Thu, 23 Jan 2025 09:45:23 +0100 Subject: [PATCH 1/5] Update neo --- .../MethodConvert/System/SystemCall.cs | 7 +++---- .../Neo.SmartContract.Testing.csproj | 2 +- src/Neo.SmartContract.Testing/TestEngine.cs | 8 ++------ .../Contract_Continue.cs | 2 ++ .../Contract_SecurityAnalyzer/Contract_CheckWitness.cs | 4 ---- .../Neo.Compiler.CSharp.TestContracts.csproj | 5 +++++ .../Neo.Compiler.CSharp.UnitTests.csproj | 5 +++++ .../Neo.SmartContract.Analyzer.UnitTests.csproj | 5 +++++ .../Neo.SmartContract.Framework.TestContracts.csproj | 8 ++++++-- .../Neo.SmartContract.Framework.UnitTests.csproj | 5 +++++ .../Services/CryptoTest.cs | 10 +++++----- .../Neo.SmartContract.Template.UnitTests.csproj | 5 +++++ .../Neo.SmartContract.Testing.UnitTests.csproj | 5 +++++ 13 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.cs b/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.cs index 03760a9b1..e36b3c5aa 100644 --- a/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.cs +++ b/src/Neo.Compiler.CSharp/MethodConvert/System/SystemCall.cs @@ -21,7 +21,6 @@ using System.Reflection; using System.Runtime.InteropServices; using Array = System.Array; -using Akka.Util.Internal; namespace Neo.Compiler; @@ -29,7 +28,7 @@ internal partial class MethodConvert { private delegate void SystemCallHandler(MethodConvert methodConvert, SemanticModel model, IMethodSymbol symbol, ExpressionSyntax? instanceExpression, IReadOnlyList? arguments); - private static readonly Dictionary SystemCallHandlers = new(); + private static readonly Dictionary SystemCallHandlers = []; static MethodConvert() { @@ -44,13 +43,13 @@ private static void RegisterHandler(Expression> expressio private static void RegisterHandler(Expression> expression, SystemCallHandler handler, string? key = null) { - key = key ?? GetKeyFromExpression(expression, typeof(T)); + key ??= GetKeyFromExpression(expression, typeof(T)); SystemCallHandlers[key] = handler; } private static void RegisterHandler(Expression> expression, SystemCallHandler handler, string? key = null) { - key = key ?? GetKeyFromExpression(expression, typeof(T1), typeof(T2)); + key ??= GetKeyFromExpression(expression, typeof(T1), typeof(T2)); SystemCallHandlers[key] = handler; } diff --git a/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj b/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj index 9f9324cf6..b34b7b0c3 100644 --- a/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj +++ b/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/Neo.SmartContract.Testing/TestEngine.cs b/src/Neo.SmartContract.Testing/TestEngine.cs index 3b82e3ab3..bcf77a330 100644 --- a/src/Neo.SmartContract.Testing/TestEngine.cs +++ b/src/Neo.SmartContract.Testing/TestEngine.cs @@ -414,12 +414,8 @@ public T Deploy(NefFile nef, ContractManifest manifest, object? data = null, // Deploy //UInt160 expectedHash = GetDeployHash(nef, manifest); - var state = Native.ContractManagement.Deploy(nef.ToArray(), Encoding.UTF8.GetBytes(manifest.ToJson().ToString(false)), data); - - if (state is null) - { - throw new Exception("Can't get the ContractState"); - } + var state = Native.ContractManagement.Deploy(nef.ToArray(), Encoding.UTF8.GetBytes(manifest.ToJson().ToString(false)), data) + ?? throw new Exception("Can't get the ContractState"); // Mock contract diff --git a/tests/Neo.Compiler.CSharp.TestContracts/Contract_Continue.cs b/tests/Neo.Compiler.CSharp.TestContracts/Contract_Continue.cs index bfe72e2ab..55771048c 100644 --- a/tests/Neo.Compiler.CSharp.TestContracts/Contract_Continue.cs +++ b/tests/Neo.Compiler.CSharp.TestContracts/Contract_Continue.cs @@ -63,7 +63,9 @@ public static void ContinueInTryCatch(bool exception) { j += 1; continue; +#pragma warning disable CS0162 // Unreachable code detected j = 10; +#pragma warning restore CS0162 // Unreachable code detected } ExecutionEngine.Assert(j == 3); try diff --git a/tests/Neo.Compiler.CSharp.TestContracts/Contract_SecurityAnalyzer/Contract_CheckWitness.cs b/tests/Neo.Compiler.CSharp.TestContracts/Contract_SecurityAnalyzer/Contract_CheckWitness.cs index b2f7cc65f..4da8c9e25 100644 --- a/tests/Neo.Compiler.CSharp.TestContracts/Contract_SecurityAnalyzer/Contract_CheckWitness.cs +++ b/tests/Neo.Compiler.CSharp.TestContracts/Contract_SecurityAnalyzer/Contract_CheckWitness.cs @@ -10,13 +10,10 @@ // modifications are permitted. using Neo.SmartContract.Framework; -using Neo.SmartContract.Framework.Attributes; -using Neo.SmartContract.Framework.Native; using Neo.SmartContract.Framework.Services; namespace Neo.Compiler.CSharp.TestContracts { -#pragma warning disable CS8625 public class Contract_CheckWitness : SmartContract.Framework.SmartContract { public static void Main(UInt160 u) @@ -24,6 +21,5 @@ public static void Main(UInt160 u) Runtime.CheckWitness(u); ExecutionEngine.Assert(Runtime.CheckWitness(u)); } -#pragma warning restore CS8625 } } diff --git a/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj b/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj index 2fc665198..9b6b5259d 100644 --- a/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj +++ b/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj @@ -17,4 +17,9 @@ + + + + + diff --git a/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj b/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj index e22e463c3..a5eb251ee 100644 --- a/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj +++ b/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj @@ -15,4 +15,9 @@ + + + + + diff --git a/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj b/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj index d39ce49c9..00a0880a2 100644 --- a/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj +++ b/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj @@ -11,4 +11,9 @@ + + + + + diff --git a/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj b/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj index 61179dea8..60041a097 100644 --- a/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj +++ b/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj @@ -15,8 +15,12 @@ - + + + + + + diff --git a/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj b/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj index b4f527644..e44561e5a 100644 --- a/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj +++ b/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj @@ -16,4 +16,9 @@ + + + + + diff --git a/tests/Neo.SmartContract.Framework.UnitTests/Services/CryptoTest.cs b/tests/Neo.SmartContract.Framework.UnitTests/Services/CryptoTest.cs index 5a63ea2b6..39d6ee33b 100644 --- a/tests/Neo.SmartContract.Framework.UnitTests/Services/CryptoTest.cs +++ b/tests/Neo.SmartContract.Framework.UnitTests/Services/CryptoTest.cs @@ -65,7 +65,7 @@ public void Test_VerifySignatureWithMessage() // Check - Assert.IsFalse(Contract.Secp256r1VerifySignatureWithMessage(System.Array.Empty(), key.PublicKey, signature)); + Assert.IsFalse(Contract.Secp256r1VerifySignatureWithMessage([], key.PublicKey, signature)); Assert.IsTrue(Contract.Secp256r1VerifySignatureWithMessage(data, key.PublicKey, signature)); // secp256r1 with Keccak hash @@ -74,7 +74,7 @@ public void Test_VerifySignatureWithMessage() // Check - Assert.IsFalse(Contract.Secp256r1VerifyKeccakSignatureWithMessage(System.Array.Empty(), key.PublicKey, signatureKeccak)); + Assert.IsFalse(Contract.Secp256r1VerifyKeccakSignatureWithMessage([], key.PublicKey, signatureKeccak)); Assert.IsTrue(Contract.Secp256r1VerifyKeccakSignatureWithMessage(data, key.PublicKey, signatureKeccak)); // secp256k1 with SHA256 hash @@ -85,16 +85,16 @@ public void Test_VerifySignatureWithMessage() // Check - Assert.IsFalse(Contract.Secp256k1VerifySignatureWithMessage(System.Array.Empty(), pubkey, signature)); + Assert.IsFalse(Contract.Secp256k1VerifySignatureWithMessage([], pubkey, signature)); Assert.IsTrue(Contract.Secp256k1VerifySignatureWithMessage(data, pubkey, signature)); // secp256k1 with Keccak hash - signature = Crypto.Sign(data, key.PrivateKey, ecCurve: Cryptography.ECC.ECCurve.Secp256k1, hasher: Hasher.Keccak256); + signature = Crypto.Sign(data, key.PrivateKey, Cryptography.ECC.ECCurve.Secp256k1, Cryptography.HashAlgorithm.Keccak256); // Check - Assert.IsFalse(Contract.Secp256k1VerifyKeccakSignatureWithMessage(System.Array.Empty(), pubkey, signature)); + Assert.IsFalse(Contract.Secp256k1VerifyKeccakSignatureWithMessage([], pubkey, signature)); Assert.IsTrue(Contract.Secp256k1VerifyKeccakSignatureWithMessage(data, pubkey, signature)); } diff --git a/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj b/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj index 91442164d..31b462e78 100644 --- a/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj +++ b/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj @@ -14,4 +14,9 @@ + + + + + diff --git a/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj b/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj index a3a2f90fb..e13a82442 100644 --- a/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj +++ b/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj @@ -12,4 +12,9 @@ + + + + + From 42a0b2435c9644e0a3244f61831f06b47a8b11ed Mon Sep 17 00:00:00 2001 From: Fernando Diaz Toledano Date: Thu, 23 Jan 2025 09:46:07 +0100 Subject: [PATCH 2/5] update neo --- neo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo b/neo index 045d96a9e..02fc4cbf3 160000 --- a/neo +++ b/neo @@ -1 +1 @@ -Subproject commit 045d96a9e21497dd3b206c218848d184e10dce01 +Subproject commit 02fc4cbf34556529f4401f76fca3130cf289946d From 8f5e57551dd574b53cb32b2de9157ef04b782276 Mon Sep 17 00:00:00 2001 From: Fernando Diaz Toledano Date: Thu, 23 Jan 2025 09:49:09 +0100 Subject: [PATCH 3/5] Revert some of them --- .../Neo.Compiler.CSharp.TestContracts.csproj | 5 ----- .../Neo.Compiler.CSharp.UnitTests.csproj | 5 ----- .../Neo.SmartContract.Analyzer.UnitTests.csproj | 5 ----- .../Neo.SmartContract.Framework.TestContracts.csproj | 8 ++------ .../Neo.SmartContract.Framework.UnitTests.csproj | 5 ----- .../Neo.SmartContract.Template.UnitTests.csproj | 5 ----- .../Neo.SmartContract.Testing.UnitTests.csproj | 5 ----- 7 files changed, 2 insertions(+), 36 deletions(-) diff --git a/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj b/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj index 9b6b5259d..2fc665198 100644 --- a/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj +++ b/tests/Neo.Compiler.CSharp.TestContracts/Neo.Compiler.CSharp.TestContracts.csproj @@ -17,9 +17,4 @@ - - - - - diff --git a/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj b/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj index a5eb251ee..e22e463c3 100644 --- a/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj +++ b/tests/Neo.Compiler.CSharp.UnitTests/Neo.Compiler.CSharp.UnitTests.csproj @@ -15,9 +15,4 @@ - - - - - diff --git a/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj b/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj index 00a0880a2..d39ce49c9 100644 --- a/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj +++ b/tests/Neo.SmartContract.Analyzer.UnitTests/Neo.SmartContract.Analyzer.UnitTests.csproj @@ -11,9 +11,4 @@ - - - - - diff --git a/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj b/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj index 60041a097..1128041ac 100644 --- a/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj +++ b/tests/Neo.SmartContract.Framework.TestContracts/Neo.SmartContract.Framework.TestContracts.csproj @@ -15,12 +15,8 @@ - - - - - - + diff --git a/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj b/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj index e44561e5a..b4f527644 100644 --- a/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj +++ b/tests/Neo.SmartContract.Framework.UnitTests/Neo.SmartContract.Framework.UnitTests.csproj @@ -16,9 +16,4 @@ - - - - - diff --git a/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj b/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj index 31b462e78..91442164d 100644 --- a/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj +++ b/tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csproj @@ -14,9 +14,4 @@ - - - - - diff --git a/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj b/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj index e13a82442..a3a2f90fb 100644 --- a/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj +++ b/tests/Neo.SmartContract.Testing.UnitTests/Neo.SmartContract.Testing.UnitTests.csproj @@ -12,9 +12,4 @@ - - - - - From a8f95c951d543115e4d9ba5a443cc1a51719c72f Mon Sep 17 00:00:00 2001 From: Fernando Diaz Toledano Date: Thu, 23 Jan 2025 11:16:42 +0100 Subject: [PATCH 4/5] Fix --- neo | 2 +- tests/Directory.Build.props | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neo b/neo index 02fc4cbf3..befe7f64d 160000 --- a/neo +++ b/neo @@ -1 +1 @@ -Subproject commit 02fc4cbf34556529f4401f76fca3130cf289946d +Subproject commit befe7f64d2ef7fa8abfb02864f63bc0bcac07875 diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index e339ad65c..8a80b3a2e 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -9,8 +9,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive From 7ba98583cf0084d04d45cfad50d3c7601a44a309 Mon Sep 17 00:00:00 2001 From: Fernando Diaz Toledano Date: Thu, 23 Jan 2025 11:35:42 +0100 Subject: [PATCH 5/5] Fix ut --- .../Coverage/CoverageDataTests.cs | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/tests/Neo.SmartContract.Testing.UnitTests/Coverage/CoverageDataTests.cs b/tests/Neo.SmartContract.Testing.UnitTests/Coverage/CoverageDataTests.cs index 205e32cb1..81513370d 100644 --- a/tests/Neo.SmartContract.Testing.UnitTests/Coverage/CoverageDataTests.cs +++ b/tests/Neo.SmartContract.Testing.UnitTests/Coverage/CoverageDataTests.cs @@ -32,35 +32,36 @@ public void TestDump() Assert.AreEqual(100_000_000, engine.Native.NEO.TotalSupply); Assert.AreEqual(WhiteSpaceRegex.Replace(@" -NeoToken [0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5] [5.00 % - 100.00 %] -┌-───────────────────────────────-┬-────────-┬-────────-┐ -│ Method │ Line │ Branch │ -├-───────────────────────────────-┼-────────-┼-────────-┤ -│ totalSupply() │ 100.00 % │ 100.00 % │ -│ balanceOf(account) │ 0.00 % │ 100.00 % │ -│ decimals() │ 0.00 % │ 100.00 % │ -│ getAccountState(account) │ 0.00 % │ 100.00 % │ -│ getAllCandidates() │ 0.00 % │ 100.00 % │ -│ getCandidates() │ 0.00 % │ 100.00 % │ -│ getCandidateVote(pubKey) │ 0.00 % │ 100.00 % │ -│ getCommittee() │ 0.00 % │ 100.00 % │ -│ getCommitteeAddress() │ 0.00 % │ 100.00 % │ -│ getGasPerBlock() │ 0.00 % │ 100.00 % │ -│ getNextBlockValidators() │ 0.00 % │ 100.00 % │ -│ getRegisterPrice() │ 0.00 % │ 100.00 % │ -│ registerCandidate(pubkey) │ 0.00 % │ 100.00 % │ -│ setGasPerBlock(gasPerBlock) │ 0.00 % │ 100.00 % │ -│ setRegisterPrice(registerPrice) │ 0.00 % │ 100.00 % │ -│ symbol() │ 0.00 % │ 100.00 % │ -│ transfer(from,to,amount,data) │ 0.00 % │ 100.00 % │ -│ unclaimedGas(account,end) │ 0.00 % │ 100.00 % │ -│ unregisterCandidate(pubkey) │ 0.00 % │ 100.00 % │ -│ vote(account,voteTo) │ 0.00 % │ 100.00 % │ -└-───────────────────────────────-┴-────────-┴-────────-┘ +NeoToken [0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5] [4.76 % - 100.00 %] +┌-────────────────────────────────-┬-────────-┬-────────-┐ +│ Method │ Line │ Branch │ +├-────────────────────────────────-┼-────────-┼-────────-┤ +│ totalSupply() │ 100.00 % │ 100.00 % │ +│ balanceOf(account) │ 0.00 % │ 100.00 % │ +│ decimals() │ 0.00 % │ 100.00 % │ +│ getAccountState(account) │ 0.00 % │ 100.00 % │ +│ getAllCandidates() │ 0.00 % │ 100.00 % │ +│ getCandidates() │ 0.00 % │ 100.00 % │ +│ getCandidateVote(pubKey) │ 0.00 % │ 100.00 % │ +│ getCommittee() │ 0.00 % │ 100.00 % │ +│ getCommitteeAddress() │ 0.00 % │ 100.00 % │ +│ getGasPerBlock() │ 0.00 % │ 100.00 % │ +│ getNextBlockValidators() │ 0.00 % │ 100.00 % │ +│ getRegisterPrice() │ 0.00 % │ 100.00 % │ +│ onNEP17Payment(from,amount,data) │ 0.00 % │ 100.00 % │ +│ registerCandidate(pubkey) │ 0.00 % │ 100.00 % │ +│ setGasPerBlock(gasPerBlock) │ 0.00 % │ 100.00 % │ +│ setRegisterPrice(registerPrice) │ 0.00 % │ 100.00 % │ +│ symbol() │ 0.00 % │ 100.00 % │ +│ transfer(from,to,amount,data) │ 0.00 % │ 100.00 % │ +│ unclaimedGas(account,end) │ 0.00 % │ 100.00 % │ +│ unregisterCandidate(pubkey) │ 0.00 % │ 100.00 % │ +│ vote(account,voteTo) │ 0.00 % │ 100.00 % │ +└-────────────────────────────────-┴-────────-┴-────────-┘ ", ""), WhiteSpaceRegex.Replace(engine.GetCoverage(engine.Native.NEO)?.Dump()!, "")); Assert.AreEqual(WhiteSpaceRegex.Replace(@" -NeoToken [0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5] [5.00 % - 100.00 %] +NeoToken [0xef4073a0f2b305a38ec4050e4d3d28bc40ea63f5] [4.76 % - 100.00 %] ┌-─────────────-┬-────────-┬-────────-┐ │ Method │ Line │ Branch │ ├-─────────────-┼-────────-┼-────────-┤ @@ -89,7 +90,7 @@ public void TestCoverageByEngine() Assert.AreEqual(100_000_000, engine.Native.NEO.TotalSupply); Assert.AreEqual(engine.Native.NEO.Hash, engine.GetCoverage(engine.Native.NEO)?.Hash); - Assert.AreEqual(60, engine.GetCoverage(engine.Native.NEO)?.TotalLines); + Assert.AreEqual(63, engine.GetCoverage(engine.Native.NEO)?.TotalLines); Assert.AreEqual(3, engine.GetCoverage(engine.Native.NEO)?.CoveredLines); Assert.AreEqual(3, engine.GetCoverage(engine.Native.NEO)?.CoveredLinesAll); @@ -97,7 +98,7 @@ public void TestCoverageByEngine() Assert.AreEqual(0, engine.Native.NEO.BalanceOf(engine.Native.NEO.Hash)); - Assert.AreEqual(60, engine.GetCoverage(engine.Native.NEO)?.TotalLines); + Assert.AreEqual(63, engine.GetCoverage(engine.Native.NEO)?.TotalLines); Assert.AreEqual(6, engine.GetCoverage(engine.Native.NEO)?.CoveredLines); Assert.AreEqual(6, engine.GetCoverage(engine.Native.NEO)?.CoveredLinesAll); @@ -160,7 +161,7 @@ public void TestCoverageByExtension() Assert.AreEqual(100_000_000, engine.Native.NEO.TotalSupply); Assert.AreEqual(engine.Native.NEO.Hash, engine.Native.NEO.GetCoverage()?.Hash); - Assert.AreEqual(60, engine.Native.NEO.GetCoverage()?.TotalLines); + Assert.AreEqual(63, engine.Native.NEO.GetCoverage()?.TotalLines); Assert.AreEqual(3, engine.Native.NEO.GetCoverage()?.CoveredLines); Assert.AreEqual(3, engine.Native.NEO.GetCoverage()?.CoveredLinesAll); @@ -168,7 +169,7 @@ public void TestCoverageByExtension() Assert.AreEqual(0, engine.Native.NEO.BalanceOf(engine.Native.NEO.Hash)); - Assert.AreEqual(60, engine.Native.NEO.GetCoverage()?.TotalLines); + Assert.AreEqual(63, engine.Native.NEO.GetCoverage()?.TotalLines); Assert.AreEqual(6, engine.Native.NEO.GetCoverage()?.CoveredLines); Assert.AreEqual(6, engine.Native.NEO.GetCoverage()?.CoveredLinesAll);