mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Add flag to turn power assertions on/off (#1419)
This commit is contained in:
@@ -28,7 +28,7 @@ import org.pkl.core.ModuleSource.*
|
||||
|
||||
class EvaluateTestsTest {
|
||||
|
||||
private val evaluator = Evaluator.preconfigured()
|
||||
private val evaluator = EvaluatorBuilder.preconfigured().setPowerAssertionsEnabled(true).build()
|
||||
|
||||
@Test
|
||||
fun `test successful module`() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -178,6 +178,7 @@ class LanguageSnippetTestsEngine : AbstractLanguageSnippetTestsEngine() {
|
||||
.addCertificates(FileTestUtils.selfSignedCertificate)
|
||||
.buildLazily()
|
||||
)
|
||||
.setPowerAssertionsEnabled(true)
|
||||
}
|
||||
|
||||
override val testClass: KClass<*> = LanguageSnippetTests::class
|
||||
@@ -200,6 +201,7 @@ class LanguageSnippetTestsEngine : AbstractLanguageSnippetTestsEngine() {
|
||||
null,
|
||||
StackFrameTransformers.empty,
|
||||
mapOf(),
|
||||
true, // enable power assertions for tests
|
||||
)
|
||||
securityManager = null
|
||||
applyFromProject(project)
|
||||
|
||||
Reference in New Issue
Block a user