Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The pexforfun thing seemed pretty clever:

  // What values of v and i can cause an exception? Ask Pex to find out!
  public static void Puzzle(int[] v, int i)
  {
    if (v[i + 2] + 5 == v.Length + i)
      throw new Exception("hidden bug!"); 
  }
and then it automatically finds the breaking input:

  {-6} 	 -2 	 Exception 	 hidden bug!



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: