コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }