);
    assert.strictEqual(1, serializer.getOrAllocateId(['b']));
    assert.strictEqual(0, serializer.getOrAllocateId('a'));
    assert.strictEqual(1, serializer.getOrAllocateId(['b']));
  });

  test('diagnostics', function() {
    const serializer = new tr.v.HistogramSerializer();
    assert.strictEqual(0, serializer.getOrAllocateDiagnosticId(
        'a', new tr.v.d.GenericSet(['b'])));
    assert.strictEqual(1, serializer.getOrAllocateDiagnosticId(
        'a', new tr.v.d.GenericSet(['c'])));
    assert