modify the definition of test array

use the ReDim to replace Dim
So the length of the test array can be a variable