-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the two extension range helpers out of Descriptor.
These two apis aren't a normal part of the C++ Descriptor api, so move them out to the plugin level itself so they aren't public api going forward. As of http://github.com/apple/swift-package-manager/pull/3316 tests can depend on executable targets. The majority of this CL is then adding a new test (only for newer SwiftPM versions) that allows the tests also to have been moved over.
- Loading branch information
Showing
15 changed files
with
871 additions
and
747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Protos/pluginlib_descriptor_test.proto - test proto | ||
// | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors | ||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See http://swift.org/LICENSE.txt for license information | ||
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors | ||
// | ||
// ----------------------------------------------------------------------------- | ||
/// | ||
/// Test proto for Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift | ||
/// | ||
// ----------------------------------------------------------------------------- | ||
|
||
syntax = "proto2"; | ||
|
||
package swift_descriptor_test; | ||
|
||
// To check handling of extension ranges that are out of order. | ||
message MsgExtensionRangeOrdering { | ||
extensions 1, 3, 2, 4; | ||
extensions 7; | ||
reserved 8; | ||
extensions 9; | ||
|
||
extensions 100 to 110; | ||
reserved 121 to 125; | ||
extensions 126 to 130; | ||
extensions 111 to 120; | ||
} | ||
|
||
// To check handling of extension ranges that are out of order, have fields or | ||
// reserved things mix through them. | ||
message MsgExtensionRangeOrderingWithFields { | ||
extensions 1, 3, 2, 4; | ||
optional int32 field6 = 6; | ||
extensions 7; | ||
reserved 8; | ||
extensions 9; | ||
|
||
extensions 100 to 110; | ||
reserved 121 to 123; | ||
optional int32 field124 = 124; | ||
optional int32 field125 = 125; | ||
extensions 126 to 130; | ||
extensions 111 to 120; | ||
optional int32 field200 = 200; | ||
} | ||
|
||
// Intermixed ranges and fields so help ensure no merge issues | ||
message MsgExtensionRangeOrderingNoMerging { | ||
optional int32 field1 = 1; | ||
optional int32 field2 = 2; | ||
extensions 3 to 5; | ||
optional int32 field6 = 6; | ||
extensions 7 to 12; | ||
optional int32 field13 = 13; | ||
optional int32 field15 = 15; | ||
extensions 16 to 20; | ||
optional int32 field21 = 21; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.