Mostly 1:1 move of the test-properties.c file in src to the one in test, but a few checks were merged into the existing functions.
cc @pobrn because it conflicts with !762