# Global Metrics

path: .metrics.nom.functions
old: 0.0
new: 4.0
path: .metrics.nom.total
old: 0.0
new: 4.0
path: .metrics.cyclomatic.sum
old: 2.0
new: 5.0
path: .metrics.nexits.average
old: null
new: 0.0
path: .metrics.cognitive.average
old: null
new: 0.0
path: .metrics.loc.ploc
old: 8.0
new: 62.0
path: .metrics.loc.cloc
old: 17.0
new: 21.0
path: .metrics.loc.blank
old: 3.0
new: 25.0
path: .metrics.loc.lloc
old: 0.0
new: 20.0
path: .metrics.loc.sloc
old: 28.0
new: 108.0
path: .metrics.nargs.sum
old: 0.0
new: 8.0
path: .metrics.nargs.average
old: null
new: 2.0
path: .metrics.halstead.effort
old: 153.25714690582942
new: 57540.01364903512
path: .metrics.halstead.difficulty
old: 2.25
new: 21.56
path: .metrics.halstead.estimated_program_length
old: 32.0
new: 320.2465572937465
path: .metrics.halstead.N1
old: 10.0
new: 254.0
path: .metrics.halstead.volume
old: 68.11428751370197
new: 2668.831801903299
path: .metrics.halstead.vocabulary
old: 12.0
new: 61.0
path: .metrics.halstead.purity_ratio
old: 1.6842105263157894
new: 0.7116590162083255
path: .metrics.halstead.N2
old: 9.0
new: 196.0
path: .metrics.halstead.n2
old: 8.0
new: 50.0
path: .metrics.halstead.bugs
old: 0.009546098314455033
new: 0.496811971495402
path: .metrics.halstead.time
old: 8.514285939212746
new: 3196.667424946396
path: .metrics.halstead.n1
old: 4.0
new: 11.0
path: .metrics.halstead.length
old: 19.0
new: 450.0
path: .metrics.halstead.level
old: 0.4444444444444444
new: 0.0463821892393321
path: .metrics.mi.mi_original
old: 94.60811457097184
new: 52.97461425356168
path: .metrics.mi.mi_visual_studio
old: 55.326382790042
new: 30.979306581030222
path: .metrics.mi.mi_sei
old: 107.723247457856
new: 32.79564968916834

# Spaces Data

## Minimal test - lines (11, 33)

path: .spaces[0].metrics.loc.sloc
old: 13.0
new: 23.0
path: .spaces[0].metrics.loc.blank
old: 2.0
new: 5.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 5.0
path: .spaces[0].metrics.loc.cloc
old: 6.0
new: 4.0
path: .spaces[0].metrics.loc.ploc
old: 5.0
new: 14.0
path: .spaces[0].metrics.nargs.average
old: null
new: 2.0
path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0
path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0
path: .spaces[0].metrics.halstead.volume
old: 58.81033751683405
new: 576.1088418559851
path: .spaces[0].metrics.halstead.vocabulary
old: 11.0
new: 39.0
path: .spaces[0].metrics.halstead.n1
old: 4.0
new: 11.0
path: .spaces[0].metrics.halstead.n2
old: 7.0
new: 28.0
path: .spaces[0].metrics.halstead.difficulty
old: 2.0
new: 9.232142857142858
path: .spaces[0].metrics.halstead.N2
old: 7.0
new: 47.0
path: .spaces[0].metrics.halstead.level
old: 0.5
new: 0.1083172147001934
path: .spaces[0].metrics.halstead.bugs
old: 0.008002048702810353
new: 0.10156641337232496
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.6265579090825428
new: 1.5840338130515883
path: .spaces[0].metrics.halstead.time
old: 6.534481946314894
new: 295.4843960709765
path: .spaces[0].metrics.halstead.N1
old: 10.0
new: 62.0
path: .spaces[0].metrics.halstead.effort
old: 117.6206750336681
new: 5318.719129277577
path: .spaces[0].metrics.halstead.length
old: 17.0
new: 109.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 27.651484454403228
new: 172.65968562262316
path: .spaces[0].metrics.mi.mi_original
old: 108.03136864180294
new: 86.92225135906554
path: .spaces[0].metrics.mi.mi_visual_studio
old: 63.17623897181459
new: 50.831725940974
path: .spaces[0].metrics.mi.mi_sei
old: 123.68975727287912
new: 79.9054575945973
path: .spaces[0].metrics.cognitive.average
old: null
new: 0.0
path: .spaces[0].metrics.nexits.average
old: null
new: 0.0

### Code

    TEST(Encoding, GoodSurrogatePair)
    {
      // When this string is decoded, the surrogate pair is U+10302 and the rest of
      // the string is specified by indexes 2 onward.
      const char16_t goodPairData[] = {0xD800, 0xDF02, 0x65, 0x78, 0x0};
      nsDependentString goodPair16(goodPairData);

      uint32_t byteCount = 0;
      char* goodPair8 = ToNewUTF8String(goodPair16, &byteCount);
      EXPECT_TRUE(!!goodPair8);

      EXPECT_EQ(byteCount, 6u);

      const unsigned char expected8[] = {0xF0, 0x90, 0x8C, 0x82, 0x65, 0x78, 0x0};
      EXPECT_EQ(0, memcmp(expected8, goodPair8, sizeof(expected8)));

      // This takes a different code path from the above, so test it to make sure
      // the UTF-16 enumeration remains in sync with the UTF-8 enumeration.
      nsDependentCString expected((const char*)expected8);
      EXPECT_EQ(0, CompareUTF8toUTF16(expected, goodPair16));

      free(goodPair8);
    }