-
Notifications
You must be signed in to change notification settings - Fork 632
[CDEC-505] Move Pos.Core.Update to Pos.Chain.Update #3611
Conversation
fba6bc9
to
18a59ef
Compare
18a59ef
to
bce925d
Compare
|
||
instance Arbitrary SystemTag where | ||
arbitrary = | ||
oneof . map (pure . SystemTag) $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oneof . map pure === elements ::: [a] -> Gen a
instance Arbitrary SystemTag where | ||
arbitrary = | ||
oneof . map (pure . SystemTag) $ | ||
[os <> arch | os <- ["win", "linux", "mac"], arch <- ["32", "64"]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it is prejudice, but I'd rather see liftA2 mappend ["win", "linux", "mac"] ["32", "64]
than a list comprehension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, or (<>) <$> ["win", "linux", "mac"] <*> ["32", "64"]
genSystemTag = SystemTag <$> Gen.text (Range.constant 0 10) Gen.alphaNum | ||
|
||
genUpAttributes :: Gen UpAttributes | ||
genUpAttributes = pure $ mkAttributes () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems wrong. This is only going to test "empty" attributes. Are those the only attributes we ever have in the system with this type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far yes - the Attributes
type is for extending records that are stored in the blockchain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat
-- <*> genUpId | ||
-- <*> Gen.bool | ||
-- <*> genSignature ((,) <$> genUpId <*> Gen.bool) | ||
-- genUpdateVote pm = mkUpdateVote pm <$> arbitrary <*> arbitrary <*> arbitrary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code?
bce925d
to
2a19d8c
Compare
Description
Last step of CDEC-505, moving
Pos.Core.Update
module set to thechain
packageLinked issue
CDEC-505
Type of change
Developer checklist
Testing checklist
QA Steps
Screenshots (if available)