Exercism: Go version of the 'Gigasecond' exercise.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
747 B

6 years ago
  1. package gigasecond
  2. // Source: exercism/problem-specifications
  3. // Commit: 5506bac gigasecond: Apply new "input" policy
  4. // Problem Specifications Version: 1.1.0
  5. // Add one gigasecond to the input.
  6. var addCases = []struct {
  7. description string
  8. in string
  9. want string
  10. }{
  11. {
  12. "date only specification of time",
  13. "2011-04-25",
  14. "2043-01-01T01:46:40",
  15. },
  16. {
  17. "second test for date only specification of time",
  18. "1977-06-13",
  19. "2009-02-19T01:46:40",
  20. },
  21. {
  22. "third test for date only specification of time",
  23. "1959-07-19",
  24. "1991-03-27T01:46:40",
  25. },
  26. {
  27. "full time specified",
  28. "2015-01-24T22:00:00",
  29. "2046-10-02T23:46:40",
  30. },
  31. {
  32. "full time with day roll-over",
  33. "2015-01-24T23:59:59",
  34. "2046-10-03T01:46:39",
  35. },
  36. }