move constraint test to its own file
constraint test improvements