From b8be3b35de73cfddbd3da5a84e4582889c9e96ec Mon Sep 17 00:00:00 2001 From: tom doron Date: Thu, 23 Apr 2020 19:10:21 -0700 Subject: [PATCH] hide testing harness in release builds motivation: testing harness should only be used for testing, and uses @testable import which doe not work in release builds changes: hide code behind #if check --- Sources/AWSLambdaTesting/Lambda+Testing.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/AWSLambdaTesting/Lambda+Testing.swift b/Sources/AWSLambdaTesting/Lambda+Testing.swift index 7fa71221..9b828610 100644 --- a/Sources/AWSLambdaTesting/Lambda+Testing.swift +++ b/Sources/AWSLambdaTesting/Lambda+Testing.swift @@ -12,7 +12,10 @@ // //===----------------------------------------------------------------------===// -// @testable for access of internal functions - this would only work for testing by design +// this is designed to only work for testing +// #if filter required for release builds which do not support @testable import +// @testable is used to access of internal functions +#if DEBUG @testable import AWSLambdaRuntime import Dispatch import Logging @@ -87,3 +90,4 @@ extension Lambda { }.wait() } } +#endif