3 ms·
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)
by 0x0 14y ago
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!