-
Notifications
You must be signed in to change notification settings - Fork 0
hw 2 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
hw 2 #2
Conversation
DedSec256
left a comment
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.
Есть некоторые замечания.
hw2/hw2/Program.fs
Outdated
| | h :: tail when element % h = 0 -> false | ||
| | h :: tail when element % h <> 0 -> testOnPrime element tail |
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.
можно было бы записать как-то так
| | h :: tail when element % h = 0 -> false | |
| | h :: tail when element % h <> 0 -> testOnPrime element tail | |
| | h :: tail -> | |
| if element % h = 0 then false else testOnPrime element tail |
но это не принципиально
|
|
||
| [<Test>] | ||
| let countEvenNumbersCheck () = | ||
| let check x = |
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.
было бы так же неплохо проверить на корректность одну из функций. А то окажется, что все функции эквивалентны, но некорректны.
hw2/hw2.Test/FunctionsTest.fs
Outdated
|
|
||
| [<Test>] | ||
| let funcToTreeTest () = | ||
| let tree1 = Tree.Tree(2, Tree.Tip(4), Tree.Tip(6)) |
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.
В тестовом дереве не хватает случаев, когда левое и правое поддерево непустые.
hw2/hw2.Test/FunctionsTest.fs
Outdated
|
|
||
| [<Test>] | ||
| let countTreeTest () = | ||
| let tree1 = TreeArithmetic.Node(Multiplication, Leaf 2, Node(Summation, Leaf 1, Leaf 1)) |
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.
остальные функции тоже было бы неплохо протестировать.
DedSec256
left a comment
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.
👍
No description provided.