WithNullCharacter* test cases in ExpressionSubstrCPTest should use StringData literal

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • Query 2016-10-31
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The test cases are using the Value(const char*) constructor and truncating the string early at the embedded null byte.

      TEST(ExpressionSubstrCPTest, WithNullCharacter) {
          assertExpectedResults("$substrCP", {{{Value("abc\0d"), Value(2), Value(3)}, Value("c\0d")}});
      }
      
      TEST(ExpressionSubstrCPTest, WithNullCharacterAtEnd) {
          assertExpectedResults("$substrCP", {{{Value("abc\0"), Value(2), Value(2)}, Value("c\0")}});
      }
      

            Assignee:
            Marko Vojvodic
            Reporter:
            Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: