Hacker News new | past | comments | ask | show | jobs | submit login

The solution is to add integration testing,

  for (i=1, i<13, i++) {
    assert.Equal(t, i, StringToMonth(MonthToString(i)))
  }
the reverse composition is harder to test.



Did you mean property testing?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: