aboutsummaryrefslogtreecommitdiff
path: root/tests/compiler/sloc-counter/testscript
blob: 841c4c332af8c81b523e475be7d3587850c49e2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# file      : tests/compiler/sloc-counter/testscript
# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
# license   : MIT; see accompanying LICENSE file

# @@ BUG: adding blank lines at the end increases the count.

: c++-program-sloc
:
$* <<EOI >'19'
// C++ comment
  // C++ comment

/* C comment */

/* Multiline
   C
   Comment


*/

#include <iostream>

char str[] = "multi\
line\
string\
literal";

using namespace std;


int main(
  int argc /*count*/,
  char* argv[] /*array*/)
{
  /* comment start */ int x = 0;
  char* s =
  /* comment start */"foo";
  int y = 2
  /* tricky stuff *//
  2;
  cerr << "Hello, \"world!" << '"'\\''"' << endl;
}
EOI