Split out the tests in test_semantics.cpp.

This revealed some bug in the runtime I haven't worked out yet.