File: set_tests.cmake

package info (click to toggle)
cmake-format 0.6.13-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,436 kB
  • sloc: python: 16,990; makefile: 14
file content (80 lines) | stat: -rw-r--r-- 1,898 bytes parent folder | download | duplicates (4)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# test: parse
#[=[
expect_parse = [
  (NodeType.BODY, [
    (NodeType.STATEMENT, [
      (NodeType.FUNNAME, []),
      (NodeType.LPAREN, []),
      (NodeType.ARGGROUP, [
        (NodeType.PARGGROUP, [
          (NodeType.ARGUMENT, []),
        ]),
        (NodeType.PARGGROUP, [
          (NodeType.COMMENT, []),
          (NodeType.ARGUMENT, []),
          (NodeType.ARGUMENT, []),
          (NodeType.ARGUMENT, []),
        ]),
      ]),
      (NodeType.RPAREN, []),
    ]),
    (NodeType.WHITESPACE, []),
  ]),
]
]=]
set(SOURCES #[[cmf:sortable]] foo.cc bar.cc baz.cc)

# test: tag_ignored_if_autosort_disabled
#[=[
autosort = False
]=]
set(SOURCES #[[cmf:sortable]] foo.cc bar.cc baz.cc)

# test: tag_respected_if_autosort_enabled
#[=[
autosort = True
]=]
set(SOURCES #[[cmf:sortable]] bar.cc baz.cc foo.cc)

# test: bracket_comment_is_not_trailing_comment_of_kwarg
#[=[
autosort = True
]=]
set(SOURCES #[[cmf:sortable]] #
            bar.cc baz.cc foo.cc)

# test: bracket_commet_short_tag
#[=[
autosort = True
]=]
set(SOURCES #[[cmf:sort]] bar.cc baz.cc foo.cc)

# test: line_comment_long_tag
#[=[
autosort = True
]=]
set(sources # cmake-format: sortable
            bar.cc baz.cc foo.cc)

# test: long_args_command_split
# This very long command should be split to multiple lines
set(HEADERS very_long_header_name_a.h very_long_header_name_b.h
            very_long_header_name_c.h)

# test: lots_of_args_command_split
# This command should be split into one line per entry because it has a long
# argument list.
set(SOURCES
    source_a.cc
    source_b.cc
    source_d.cc
    source_e.cc
    source_f.cc
    source_g.cc
    source_h.cc)

# test: cmdline_is_hwrapped
set(CTEST_GIT_COMMAND
    really-long-argument really-long-argument really-long-argument
    really-long-argument really-long-argument really-long-argument
    really-long-argument really-long-argument really-long-argument)