Adapt some tests from Cap'n Proto.