[K/N] Add a trivial test coverage for use Foundation
This commit is contained in:
committed by
Space Team
parent
ba4ba27afd
commit
02c46d17aa
@@ -6088,6 +6088,21 @@ if (isAppleTarget(project)) {
|
|||||||
}
|
}
|
||||||
swiftSources = ['framework/forwardDeclarations/']
|
swiftSources = ['framework/forwardDeclarations/']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frameworkTest("testFrameworkUsesFoundationModule") {
|
||||||
|
framework("Bar") {
|
||||||
|
sources = ["framework/use_foundation_module/framework.kt"]
|
||||||
|
}
|
||||||
|
swiftSources = []
|
||||||
|
doLast {
|
||||||
|
def frameworkPath = "$testOutputFramework/testFrameworkUsesFoundationModule/$target/Bar.framework"
|
||||||
|
def moduleMapContent = file("$frameworkPath/Modules/module.modulemap").text
|
||||||
|
def useFoundationPattern = ~"use Foundation"
|
||||||
|
if (!useFoundationPattern.matcher(moduleMapContent).find()) {
|
||||||
|
throw new Error("Expected use of Foundation module:\n$moduleMapContent")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package shared
|
||||||
|
|
||||||
|
fun shared() {}
|
||||||
Reference in New Issue
Block a user