forked from schmittlauch/Hash2Pub
adjust tests to new NodeState
This commit is contained in:
parent
0e33d442f9
commit
ea6ebe590d
|
@ -33,7 +33,7 @@ spec = do
|
||||||
-- edge cases
|
-- edge cases
|
||||||
(toNodeID 5001 - toNodeID 2^(255::Integer) < 5001) `shouldBe` True
|
(toNodeID 5001 - toNodeID 2^(255::Integer) < 5001) `shouldBe` True
|
||||||
(toNodeID 5001 - toNodeID 2^(255::Integer) - 1) < 5001 `shouldBe` False
|
(toNodeID 5001 - toNodeID 2^(255::Integer) - 1) < 5001 `shouldBe` False
|
||||||
it "throws an exception when @toNodeID@ on out-of-bound values" $
|
it "throws an exception when @toNodeID@ on out-of-bound values"
|
||||||
pending
|
pending
|
||||||
it "can be generated" $ do
|
it "can be generated" $ do
|
||||||
genNodeIDBS ip nodeDomain vs `shouldBe` "\ACK\211\183&S\GS\214\247Xn8\216\232\195\247\162\182\253\210\SOHG7I\194\251\196\130\142RSx\219"
|
genNodeIDBS ip nodeDomain vs `shouldBe` "\ACK\211\183&S\GS\214\247Xn8\216\232\195\247\162\182\253\210\SOHG7I\194\251\196\130\142RSx\219"
|
||||||
|
@ -64,6 +64,7 @@ spec = do
|
||||||
, kNeighbours = 3
|
, kNeighbours = 3
|
||||||
, lNumBestNodes = 3
|
, lNumBestNodes = 3
|
||||||
, pNumParallelQueries = 2
|
, pNumParallelQueries = 2
|
||||||
|
, jEntriesPerSlice = 2
|
||||||
}
|
}
|
||||||
print ns
|
print ns
|
||||||
it "can be initialised partly and then modified later" $ do
|
it "can be initialised partly and then modified later" $ do
|
||||||
|
@ -79,6 +80,7 @@ spec = do
|
||||||
, kNeighbours = 3
|
, kNeighbours = 3
|
||||||
, lNumBestNodes = 3
|
, lNumBestNodes = 3
|
||||||
, pNumParallelQueries = 2
|
, pNumParallelQueries = 2
|
||||||
|
, jEntriesPerSlice = 2
|
||||||
}
|
}
|
||||||
nsReady = ns {
|
nsReady = ns {
|
||||||
nid = genNodeID (ipAddr ns) (domain ns) 3
|
nid = genNodeID (ipAddr ns) (domain ns) 3
|
||||||
|
|
Loading…
Reference in a new issue