I understand the motivation behind implementing a test which exceeds the 32-bit range:
[Fact]
public void Factors_include_a_large_prime()
{
Assert.Equal(new[] { 11, 9539, 894119 }, PrimeFactors.Factors(93819012551));
}
but I think it is misguided at best if not encouraging questionable practice to then have the solution template mixing 32- and 64-bit (public static int[] Factors(long number)) and the tests all testing against an int instead of long. If the student is meant to implement support for 64-bit numbers it should also test against 64-bit values.
I understand the motivation behind implementing a test which exceeds the 32-bit range:
but I think it is misguided at best if not encouraging questionable practice to then have the solution template mixing 32- and 64-bit (
public static int[] Factors(long number)) and the tests all testing against anintinstead oflong. If the student is meant to implement support for 64-bit numbers it should also test against 64-bit values.