added set.seed() to all random tests (to avoid randomly-occurring differences)
added tests for C_rect