File: ASTSection-multi.swift

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (52 lines) | stat: -rw-r--r-- 2,123 bytes parent folder | download
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
// REQUIRES: OS=linux-gnu
// REQUIRES: executable_test
// REQUIRES: swift_tools_extra

// Test that concatenated .swift_ast sections of various sizes can be parsed.

// RUN: %empty-directory(%t)

// RUN: echo "public let a0 = 0"  >%t/a0.swift

// RUN: echo "public let a1 = 0"  >%t/a1.swift
// RUN: echo "public let b1 = 0" >>%t/a1.swift

// RUN: echo "public let a2 = 0"  >%t/a2.swift
// RUN: echo "public let b2 = 0" >>%t/a2.swift
// RUN: echo "public let c2 = 0" >>%t/a2.swift

// RUN: echo "public let a3 = 0"  >%t/a3.swift
// RUN: echo "public let b3 = 0" >>%t/a3.swift
// RUN: echo "public let c3 = 0" >>%t/a3.swift
// RUN: echo "public let d3 = 0" >>%t/a3.swift

// RUN: %target-build-swift %t/a0.swift -c -g -o %t/a0.o -parse-as-library
// RUN: %target-build-swift %t/a1.swift -c -g -o %t/a1.o -parse-as-library
// RUN: %target-build-swift %t/a2.swift -c -g -o %t/a2.o -parse-as-library
// RUN: %target-build-swift %t/a3.swift -c -g -o %t/a3.o -parse-as-library

// RUN: %target-build-swift %t/a0.swift -emit-module -emit-module-path %t/a0.swiftmodule
// RUN: %target-build-swift %t/a1.swift -emit-module -emit-module-path %t/a1.swiftmodule
// RUN: %target-build-swift %t/a2.swift -emit-module -emit-module-path %t/a2.swiftmodule
// RUN: %target-build-swift %t/a3.swift -emit-module -emit-module-path %t/a3.swiftmodule

// RUN: %target-swift-modulewrap %t/a0.swiftmodule -o %t/a0-mod.o
// RUN: %target-swift-modulewrap %t/a1.swiftmodule -o %t/a1-mod.o
// RUN: %target-swift-modulewrap %t/a2.swiftmodule -o %t/a2-mod.o
// RUN: %target-swift-modulewrap %t/a3.swiftmodule -o %t/a3-mod.o

// RUN: %target-build-swift -o %t/a.out %s \
// RUN:                     %t/a0.o %t/a0-mod.o \
// RUN:                     %t/a1.o %t/a1-mod.o \
// RUN:                     %t/a2.o %t/a2-mod.o \
// RUN:                     %t/a3.o %t/a3-mod.o

// RUN: %lldb-moduleimport-test -verbose %t/a.out | %FileCheck %s
// CHECK-DAG: Importing a0...
// CHECK-DAG: Import successful!
// CHECK-DAG: Importing a1...
// CHECK-DAG: Import successful!
// CHECK-DAG: Importing a2...
// CHECK-DAG: Import successful!
// CHECK-DAG: Importing a3...