Skip to content

Commit

Permalink
Merge branch 'master' into seconds-to-milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
lock9 authored Jul 19, 2019
2 parents 889dea1 + 3e7bee4 commit a4badf0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
6 changes: 3 additions & 3 deletions neo.UnitTests/UT_Culture.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Neo.UnitTests
{
Expand All @@ -18,7 +18,7 @@ public void All_Tests_Cultures()
{
// get all tests in the unit test project assembly
var testClasses = (from t in typeof(NotReRunnableAttribute).GetTypeInfo().Assembly.DefinedTypes
where t.GetCustomAttribute<TestClassAttribute>() != null
where t.GetCustomAttribute<TestClassAttribute>() != null && t.GetCustomAttribute<NotReRunnableAttribute>() == null
select new
{
Constructor = t.GetConstructor(new Type[] { }),
Expand Down
5 changes: 3 additions & 2 deletions neo.UnitTests/UT_RemoteNode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Akka.IO;
using Akka.IO;
using Akka.TestKit.Xunit2;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
Expand All @@ -8,7 +8,8 @@

namespace Neo.UnitTests
{
[TestClass]
[TestClass]
[NotReRunnable]
public class UT_RemoteNode : TestKit
{
private static NeoSystem testBlockchain;
Expand Down
12 changes: 3 additions & 9 deletions neo.UnitTests/UT_RemoteNodeMailbox.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
using Akka.TestKit;
using System;
using Akka.IO;
using Akka.TestKit.Xunit2;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Moq;
using Neo.Ledger;
using Neo.Network.P2P.Payloads;
using Neo.Network.P2P;
using Akka.Configuration;
using System.Net;
using Akka.Actor;
using Akka.IO;

namespace Neo.UnitTests
{
[TestClass]
[NotReRunnable]
public class UT_RemoteNodeMailbox : TestKit
{
private static readonly Random TestRandom = new Random(1337); // use fixed seed for guaranteed determinism
Expand Down
4 changes: 2 additions & 2 deletions neo.UnitTests/UT_Scrypt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public class UT_Scrypt
[TestMethod]
public void DeriveKeyTest()
{
int N = 16384, r = 8, p = 8;
int N = 32, r = 2, p = 2;

var derivedkey = SCrypt.DeriveKey(new byte[] { 0x01, 0x02, 0x03 }, new byte[] { 0x04, 0x05, 0x06 }, N, r, p, 64).ToHexString();
Assert.AreEqual("2bb9c7bb9c392f0dd37821b76e42b01944902520f48d00946a51e72c960fba0a3c62a87d835c9df10a8ad66a04cdf02fbb10b9d7396c20959f28d6cb3ddfdffb", derivedkey);
Assert.AreEqual("b6274d3a81892c24335ab46a08ec16d040ac00c5943b212099a44b76a9b8102631ab988fa07fb35357cee7b0e3910098c0774c0e97399997676d890b2bf2bb25", derivedkey);
}
}
}

0 comments on commit a4badf0

Please sign in to comment.