1*99451b44SJordan Rupprecht //===-- main.cpp ------------------------------------------------*- C++ -*-===//
2*99451b44SJordan Rupprecht //
3*99451b44SJordan Rupprecht // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*99451b44SJordan Rupprecht // See https://llvm.org/LICENSE.txt for license information.
5*99451b44SJordan Rupprecht // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*99451b44SJordan Rupprecht //
7*99451b44SJordan Rupprecht //===----------------------------------------------------------------------===//
8*99451b44SJordan Rupprecht 
9*99451b44SJordan Rupprecht #include <string>
10*99451b44SJordan Rupprecht 
11*99451b44SJordan Rupprecht int main (int argc, char const *argv[])
12*99451b44SJordan Rupprecht {
13*99451b44SJordan Rupprecht     std::string stdstring("Hello\t\tWorld\nI am here\t\tto say hello\n"); //%self.addTearDownHook(lambda x: x.runCmd("setting set escape-non-printables true"))
14*99451b44SJordan Rupprecht     const char* constcharstar = stdstring.c_str();
15*99451b44SJordan Rupprecht     std::string longstring(
16*99451b44SJordan Rupprecht "I am a very long string; in fact I am longer than any reasonable length that a string should be; quite long indeed; oh my, so many words; so many letters; this is kind of like writing a poem; except in real life all that is happening"
17*99451b44SJordan Rupprecht " is just me producing a very very long set of words; there is text here, text there, text everywhere; it fills me with glee to see so much text; all around me it's just letters, and symbols, and other pleasant drawings that cause me"
18*99451b44SJordan Rupprecht " a large amount of joy upon visually seeing them with my eyes; well, this is now a lot of letters, but it is still not enough for the purpose of the test I want to test, so maybe I should copy and paste this a few times, you know.."
19*99451b44SJordan Rupprecht " for science, or something"
20*99451b44SJordan Rupprecht       "I am a very long string; in fact I am longer than any reasonable length that a string should be; quite long indeed; oh my, so many words; so many letters; this is kind of like writing a poem; except in real life all that is happening"
21*99451b44SJordan Rupprecht       " is just me producing a very very long set of words; there is text here, text there, text everywhere; it fills me with glee to see so much text; all around me it's just letters, and symbols, and other pleasant drawings that cause me"
22*99451b44SJordan Rupprecht       " a large amount of joy upon visually seeing them with my eyes; well, this is now a lot of letters, but it is still not enough for the purpose of the test I want to test, so maybe I should copy and paste this a few times, you know.."
23*99451b44SJordan Rupprecht       " for science, or something"
24*99451b44SJordan Rupprecht             "I am a very long string; in fact I am longer than any reasonable length that a string should be; quite long indeed; oh my, so many words; so many letters; this is kind of like writing a poem; except in real life all that is happening"
25*99451b44SJordan Rupprecht             " is just me producing a very very long set of words; there is text here, text there, text everywhere; it fills me with glee to see so much text; all around me it's just letters, and symbols, and other pleasant drawings that cause me"
26*99451b44SJordan Rupprecht             " a large amount of joy upon visually seeing them with my eyes; well, this is now a lot of letters, but it is still not enough for the purpose of the test I want to test, so maybe I should copy and paste this a few times, you know.."
27*99451b44SJordan Rupprecht             " for science, or something"
28*99451b44SJordan Rupprecht       );
29*99451b44SJordan Rupprecht     const char* longconstcharstar = longstring.c_str();
30*99451b44SJordan Rupprecht     return 0;     //% if self.TraceOn(): self.runCmd('frame variable')
31*99451b44SJordan Rupprecht       //% self.assertTrue(self.frame().FindVariable('stdstring').GetSummary() == '"Hello\\t\\tWorld\\nI am here\\t\\tto say hello\\n"')
32*99451b44SJordan Rupprecht      //% self.assertTrue(self.frame().FindVariable('constcharstar').GetSummary() == '"Hello\\t\\tWorld\\nI am here\\t\\tto say hello\\n"')
33*99451b44SJordan Rupprecht      //% self.runCmd("setting set escape-non-printables false")
34*99451b44SJordan Rupprecht      //% self.assertTrue(self.frame().FindVariable('stdstring').GetSummary() == '"Hello\t\tWorld\nI am here\t\tto say hello\n"')
35*99451b44SJordan Rupprecht      //% self.assertTrue(self.frame().FindVariable('constcharstar').GetSummary() == '"Hello\t\tWorld\nI am here\t\tto say hello\n"')
36*99451b44SJordan Rupprecht     //% self.assertTrue(self.frame().FindVariable('longstring').GetSummary().endswith('"...'))
37*99451b44SJordan Rupprecht     //% self.assertTrue(self.frame().FindVariable('longconstcharstar').GetSummary().endswith('"...'))
38*99451b44SJordan Rupprecht }
39*99451b44SJordan Rupprecht 
40