core.pure.tools.testProfiles.pure Maven / Gradle / Ivy
// Copyright 2020 Goldman Sachs
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
function meta::alloy::isMetaAlloyTestDependency(pe:Type[1]):Boolean[1]
{
$pe->cast(@PackageableElement)->meta::alloy::isMetaAlloyTestDependency()
}
function meta::alloy::isMetaAlloyTestDependency(pe:Function[1]):Boolean[1]
{
$pe->instanceOf(PackageableElement) && $pe->cast(@PackageableElement)->meta::alloy::isMetaAlloyTestDependency()
}
function meta::alloy::isMetaAlloyTestDependency(pe:PackageableElement[1]):Boolean[1]
{
let path = $pe->elementToPath();
//TOFIX: use packages instead of STRINGS
$path->startsWith('meta::relational::tests') || $path->startsWith('meta::pure::mapping::modelToModel::test::alloy') || $path->startsWith('meta::pure::mapping::modelToModel::test::createInstances') || $path->startsWith('meta::pure::tests::model::simple') || $path->startsWith('meta::pure::graphFetch::tests::sourceTreeCalc::withSubType');
}
function meta::alloy::isMetaAlloyTestDependencyForGeneration(pe:Function[1]):Boolean[1]
{
$pe->cast(@PackageableElement)->meta::alloy::isMetaAlloyTestDependencyForGeneration();
}
function meta::alloy::isMetaAlloyTestDependencyForGeneration(pe:PackageableElement[1]):Boolean[1]
{
let path = $pe->elementToPath();
$path->startsWith('meta::external::format::json::schema::fromSchema::tests') || $path->startsWith('meta::external::format::json::schema::tests') || $path->startsWith('meta::pure::mapping::modelToModel::test::createInstances') || $path->startsWith('meta::pure::tests::model::simple');
}