-
Notifications
You must be signed in to change notification settings - Fork 8
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
vadzimz_homework_8 #37
base: main
Are you sure you want to change the base?
Conversation
Vadzimz-homework-6
vadzimz homework 6.clj
(deftest test-get-idx | ||
(testing "legal args" | ||
(are [a b] (= b (#'sut/get-idx a)) | ||
8448 136.0 4944 79.0 5310 85.0 9626 155.0 5217 84.0)) |
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.
Я бы поместил каждую пару на отдельную строку для большей читабельности
(is (thrown? ClassCastException (#'sut/get-idx "8448"))) | ||
(is (thrown? ClassCastException (#'sut/get-idx [8448]))) | ||
(is (thrown? ClassCastException (#'sut/get-idx {:i 8448}))))) |
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.
Почему бы не поместить их в are
?
(is (thrown? ClassCastException (#'sut/get-idx [8448]))) | ||
(is (thrown? ClassCastException (#'sut/get-idx {:i 8448}))))) | ||
|
||
(deftest test-get-character-by-idx |
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.
кажется здесь не хватает 0 как граничного значения
(is (thrown? ClassCastException (#'sut/get-character-by-idx {:i 5047}))) | ||
(is (nil? (#'sut/get-character-by-idx -5047))))) | ||
|
||
(deftest test-int->id |
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.
аналогично, я бы здесь добавил тест на 0
(is (thrown? ClassCastException (sut/int->id {:int 56544447}))) | ||
(is (empty? (sut/int->id -56544447))))) | ||
|
||
(deftest test-id->int |
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.