xref: /llvm-project/llvm/test/tools/llvm-readtapi/compare-flags.test (revision ec64af5994213cf7933e961a2b7fe07193a77b61)
1; RUN: rm -rf %t
2; RUN: split-file %s %t
3; RUN: not llvm-readtapi --compare %t/tbdv4.tbd  %t/tbdv5.tbd -o %t/output.txt 2>&1 | FileCheck %s --allow-empty
4; RUN: FileCheck %s --check-prefix FILEOUT <  %t/output.txt
5
6; CHECK-NOT: error:
7; CHECK-NOT: warning:
8
9; FILEOUT: < {{.*}}tbdv4.tbd
10; FILEOUT: > {{.*}}tbdv5.tbd
11
12; FILEOUT:      Two Level Namespace
13; FILEOUT-NEXT:         < true
14; FILEOUT-NEXT:         > false
15; FILEOUT-NEXT: Shared Cache Ineligible
16; FILEOUT-NEXT:         < true
17; FILEOUT-NEXT:         > false
18
19
20
21//--- tbdv4.tbd
22--- !tapi-tbd
23tbd-version:     4
24targets:         [ arm64-macos ]
25flags:           [ not_app_extension_safe, not_for_dyld_shared_cache ]
26install-name:    '/usr/lib/libFake.dylib'
27...
28
29//--- tbdv5.tbd
30{
31    "main_library": {
32        "flags": [
33            {
34                "attributes": [
35                    "not_app_extension_safe",
36                    "flat_namespace"
37                ]
38            }
39        ],
40        "install_names": [
41            {
42                "name": "/usr/lib/libFake.dylib"
43            }
44        ],
45        "target_info": [
46            {
47                "min_deployment": "13",
48                "target": "arm64-macos"
49            }
50        ]
51    },
52    "tapi_tbd_version": 5
53}
54
55