anchor.diff:    client = new ThriftTestClient(protocol);
   
     await transport.open();
  -
  -  await runTests();
  -}
  -
  -Future _test(String name, Function testFunc) async {
  -  if (verbose) stdout.write('$name... ');
  -  await testFunc();
  -  if (verbose) stdout.writeln('success!');
  -}
  -
  -Future runTests() async {
  +}
  +
  +List<TTest> _createTests() {
  +  List<TTest> tests = [];
  +
     var xtruct = new Xtruct()
       ..string_thing = 'Zero'
       ..byte_thing = 1
       ..i32_thing = -3
       ..i64_thing = -5;
   
  -  await _test('testVoid', () async {
  +  tests.add(new TTest(TEST_BASETYPES, 'testVoid', () async {
       await client.testVoid();
  -  });
  -
  -  await _test('testString', () async {
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testString', () async {
       var input = 'Test';
       var result = await client.testString(input);
  -    if (result != input) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testBool', () async {
  +    if (result != input) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testBool', () async {
       var input = true;
       var result = await client.testBool(input);
  -    if (result != input) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testByte', () async {
  +    if (result != input) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testByte', () async {
       var input = 64;
       var result = await client.testByte(input);
  -    if (result != input) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testI32', () async {
  +    if (result != input) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testI32', () async {
       var input = 2147483647;
       var result = await client.testI32(input);
  -    if (result != input) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testI64', () async {
  +    if (result != input) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testI64', () async {
       var input = 9223372036854775807;
       var result = await client.testI64(input);
  -    if (result != input) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testDouble', () async {
  +    if (result != input) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testDouble', () async {
       var input = 3.1415926;
       var result = await client.testDouble(input);
  -    if (result != input) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testBinary', () async {
  +    if (result != input) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testBinary', () async {
       var utf8Codec = const Utf8Codec();
       var input = utf8Codec.encode('foo');
       var result = await client.testBinary(input);
       var equality = const ListEquality();
  -    if (!equality.equals(
  -        result, input)) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testStruct', () async {
  +    if (!equality.equals(result, input)) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testStruct', () async {
       var result = await client.testStruct(xtruct);
  -    if ('$result' != '$xtruct') throw new StateError('$result != $xtruct');
  -  });
  -
  -  await _test('testNest', () async {
  +    if ('$result' != '$xtruct') throw new TTestError(result, xtruct);
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testNest', () async {
       var input = new Xtruct2()
         ..byte_thing = 1
         ..struct_thing = xtruct
         ..i32_thing = -3;
   
       var result = await client.testNest(input);
  -    if ('$result' != '$input') throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testMap', () async {
  +    if ('$result' != '$input') throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testMap', () async {
       Map<int, int> input = {1: -10, 2: -9, 3: -8, 4: -7, 5: -6};
   
       var result = await client.testMap(input);
       var equality = const MapEquality();
  -    if (!equality.equals(
  -        result, input)) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testSet', () async {
  +    if (!equality.equals(result, input)) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testSet', () async {
       var input = new Set.from([-2, -1, 0, 1, 2]);
       var result = await client.testSet(input);
       var equality = const SetEquality();
  -    if (!equality.equals(
  -        result, input)) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testList', () async {
  +    if (!equality.equals(result, input)) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testList', () async {
       var input = [-2, -1, 0, 1, 2];
       var result = await client.testList(input);
       var equality = const ListEquality();
  -    if (!equality.equals(
  -        result, input)) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testEnum', () async {
  +    if (!equality.equals(result, input)) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testEnum', () async {
       await _testEnum(Numberz.ONE);
       await _testEnum(Numberz.TWO);
       await _testEnum(Numberz.THREE);
       await _testEnum(Numberz.FIVE);
       await _testEnum(Numberz.EIGHT);
  -  });
  -
  -  await _test('testTypedef', () async {
  +  }));
  +
  +  tests.add(new TTest(TEST_BASETYPES, 'testTypedef', () async {
       var input = 309858235082523;
       var result = await client.testTypedef(input);
  -    if (result != input) throw new StateError('$result != $input');
  -  });
  -
  -  await _test('testMapMap', () async {
  +    if (result != input) throw new TTestError(result, input);
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testMapMap', () async {
       Map<int, Map<int, int>> result = await client.testMapMap(1);
  -    if (result.isEmpty ||
  -        result[result.keys.first].isEmpty) throw new StateError(
  -        'expected Map<int, Map<int, int>> got $result');
  -  });
  -
  -  await _test('testInsanity', () async {
  +    if (result.isEmpty || result[result.keys.first].isEmpty) {
  +      throw new TTestError(result, 'Map<int, Map<int, int>>');
  +    }
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testInsanity', () async {
       var input = new Insanity();
       input.userMap = {Numberz.FIVE: 5000};
       input.xtructs = [xtruct];
   
       Map<int, Map<int, Insanity>> result = await client.testInsanity(input);
  -    if (result.isEmpty ||
  -        result[result.keys.first].isEmpty) throw new StateError(
  -        'expected Map<int, Map<int, Insanity>> got $result');
  -  });
  -
  -  await _test('testMulti', () async {
  +    if (result.isEmpty || result[result.keys.first].isEmpty) {
  +      throw new TTestError(result, 'Map<int, Map<int, Insanity>>');
  +    }
  +  }));
  +
  +  tests.add(new TTest(TEST_CONTAINERS, 'testMulti', () async {
       var input = new Xtruct()
         ..string_thing = 'Hello2'
         ..byte_thing = 123
  
positive.code:     results = parser.parse(args);
    } catch (e) {
      stdout.writeln('$e\n');
      results = null;
    }
  
    if (results == null) {
      print(parser.usage);
      exit(0);
    }
  
    verbose = results['verbose'] == true;
  
    await init(
        host: results['host'],
        port: int.parse(results['port']),
        transportType: results['transport'],
        protocolType: results['protocol']).then((_) {
      exit(0);
    }).catchError((e) {
      stdout.writeln('Error:');
      stdout.writeln('$e');
      if (e is Error) {
        stdout.writeln('${e.stackTrace}');
      }
      exit(1);
    });
    exit(0);
  }
  
  TProtocolFactory getProtocolFactory(String protocolType) {
  
negative.code: 
      var result = await client.testMulti(input.byte_thing, input.i32_thing,
          input.i64_thing, {1: 'one'}, Numberz.EIGHT, 5678);
      if ('$result' != '$input') throw new TTestError(result, input);
    }));
  
    tests.add(new TTest(TEST_EXCEPTIONS, 'testException', () async {
      try {
        await client.testException('Xception');
      } on Xception catch (x) {
        return;
      }
  
      throw new TTestError(null, 'Xception');
    }));
  
    tests.add(new TTest(TEST_EXCEPTIONS, 'testMultiException', () async {
      try {
        await client.testMultiException('Xception2', 'foo');
      } on Xception2 catch (x) {
        return;
      }
  
      throw new TTestError(null, 'Xception2');
    }));
  
    return tests;
  }
  
  Future _testEnum(int input) async {
    var result = await client.testEnum(input);
    if (result != input) throw new TTestError(result, input);
  }
  