暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

task4.rs 546B

12345678910111213141516171819202122232425262728293031
  1. extern crate task4;
  2. #[test]
  3. fn test_square_of_sum_5() {
  4. assert_eq!(225, task4::square_of_sum(5));
  5. }
  6. #[test]
  7. fn test_sum_of_squares_5() {
  8. assert_eq!(55, task4::sum_of_squares(5));
  9. }
  10. #[test]
  11. fn test_difference_5() {
  12. assert_eq!(170, task4::difference(5));
  13. }
  14. #[test]
  15. fn test_square_of_sum_100() {
  16. assert_eq!(25502500, task4::square_of_sum(100));
  17. }
  18. #[test]
  19. fn test_sum_of_squares_100() {
  20. assert_eq!(338350, task4::sum_of_squares(100));
  21. }
  22. #[test]
  23. fn test_difference_100() {
  24. assert_eq!(25164150, task4::difference(100));
  25. }