public int RepeatedValuesJsonTests(int seed) { var opts = CreateRepeated(seed); var sts = opts.ToString(); if (Mode == 0) return sts.Length; var optz = new RepFields(); optz.MergeFrom(sts); Assert.That(opts.Equals(optz), "JSON multi values encode-decode"); return sts.Length; }
public int RepeatedValuesProtoTests(int seed) { var opts = CreateRepeated(seed); var bto = opts.ToByteArray(); if (Mode == 0) return bto.Length; var optz = new RepFields(); optz.MergeFrom(bto); Assert.That(opts.Equals(optz), "PB multi values encode-decode"); return bto.Length; }