Skip to content

Commit 10f4285

Browse files
authored
Public API build test coverage and public header cleanup (#8960)
1 parent d1bb76f commit 10f4285

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

FirebaseFunctions/Sources/Public/FirebaseFunctions/FIRHTTPSCallable.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,10 @@ NS_SWIFT_NAME(HTTPSCallable)
8181
* @param data Parameters to pass to the trigger.
8282
* @param completion The block to call when the HTTPS request has completed.
8383
*/
84-
// clang-format off
85-
// because it incorrectly breaks this NS_SWIFT_NAME.
8684
- (void)callWithObject:(nullable id)data
8785
completion:(void (^)(FIRHTTPSCallableResult *_Nullable result,
8886
NSError *_Nullable error))completion
8987
NS_SWIFT_NAME(call(_:completion:));
90-
// clang-format on
9188

9289
/**
9390
* The timeout to use when calling the function. Defaults to 60 seconds.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
import Foundation
16+
17+
import FirebaseCore
18+
import FirebaseFunctions
19+
20+
// This file is a build-only test for the public Functions Swift APIs not
21+
// exercised in IntegrationTests.swift.
22+
23+
func apis() {
24+
Functions.functions()
25+
Functions.functions(region: "my-region")
26+
Functions.functions(customDomain: "abc")
27+
let myApp = FirebaseApp.app()!
28+
Functions.functions(app: myApp)
29+
Functions.functions(app: myApp, region: "my-region")
30+
Functions.functions(app: myApp, customDomain: "my-domain")
31+
Functions.functions().useLocalhost()
32+
Functions.functions().useEmulator(withHost: "my-host", port: 1234)
33+
}

0 commit comments

Comments
 (0)