2022-03-16 18:42:30 +00:00
|
|
|
package dotnet
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
|
|
|
|
"github.com/pulumi/pulumi/pkg/v3/codegen"
|
|
|
|
"github.com/pulumi/pulumi/pkg/v3/codegen/testing/test"
|
|
|
|
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
|
|
|
|
"github.com/pulumi/pulumi/sdk/v3/go/common/util/executable"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Check(t *testing.T, path string, dependencies codegen.StringSet, pulumiSDKPath string) {
|
|
|
|
var err error
|
|
|
|
dir := filepath.Dir(path)
|
|
|
|
|
|
|
|
ex, err := executable.FindExecutable("dotnet")
|
|
|
|
require.NoError(t, err, "Failed to find dotnet executable")
|
|
|
|
|
|
|
|
// We create a new cs-project each time the test is run.
|
|
|
|
projectFile := filepath.Join(dir, filepath.Base(dir)+".csproj")
|
|
|
|
programFile := filepath.Join(dir, "Program.cs")
|
|
|
|
if err = os.Remove(projectFile); !os.IsNotExist(err) {
|
|
|
|
require.NoError(t, err)
|
|
|
|
}
|
|
|
|
if err = os.Remove(programFile); !os.IsNotExist(err) {
|
|
|
|
require.NoError(t, err)
|
|
|
|
}
|
|
|
|
err = integration.RunCommand(t, "create dotnet project",
|
[program-gen] Emit Output-returning JSON serialization methods without rewriting applies (#15371)
### Description
A while ago we started implementing [specialized JSON serialization
methods](https://github.com/pulumi/pulumi/issues/12519) for Pulumi
programs which can accept nested outputs without having to rewrite and
combine applies.
- `Output.SerializeJson` in .NET
- `pulumi.jsonStringify` in nodejs
- `pulumi.Output.json_dumps` in Python
This PR extends program-gen for TypeScript, C# and Python to start
emitting these JSON serialization functions (when necessary). The PR
special-cases the `toJSON` PCL function when rewriting applies so that
nested outputs aren't rewritted.
Example PCL program and generated results:
> Also check out the downstream codegen tests to see improved generated
examples
```
resource vpc "aws:ec2:Vpc" {
cidrBlock = "10.100.0.0/16"
instanceTenancy = "default"
}
resource policy "aws:iam/policy:Policy" {
description = "test"
policy = toJSON({
"Version" = "2012-10-17"
"Interpolated" = "arn:${vpc.arn}:value"
"Value" = vpc.id
})
}
```
### Generated TypeScript Before
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpc = new aws.ec2.Vpc("vpc", {
cidrBlock: "10.100.0.0/16",
instanceTenancy: "default",
});
const policy = new aws.iam.Policy("policy", {
description: "test",
policy: pulumi.all([vpc.arn, vpc.id]).apply(([arn, id]) => JSON.stringify({
Version: "2012-10-17",
Interpolated: `arn:${arn}:value`,
Value: id,
})),
});
```
### Generated TypeScript After
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpc = new aws.ec2.Vpc("vpc", {
cidrBlock: "10.100.0.0/16",
instanceTenancy: "default",
});
const policy = new aws.iam.Policy("policy", {
description: "test",
policy: pulumi.jsonStringify({
Version: "2012-10-17",
Interpolated: pulumi.interpolate`arn:${vpc.arn}:value`,
Value: vpc.id,
}),
});
```
### Generated Python Before
```python
import pulumi
import json
import pulumi_aws as aws
vpc = aws.ec2.Vpc("vpc",
cidr_block="10.100.0.0/16",
instance_tenancy="default")
policy = aws.iam.Policy("policy",
description="test",
policy=pulumi.Output.all(vpc.arn, vpc.id).apply(lambda arn, id: json.dumps({
"Version": "2012-10-17",
"Interpolated": f"arn:{arn}:value",
"Value": id,
})))
```
### Generated Python After
```python
import pulumi
import json
import pulumi_aws as aws
vpc = aws.ec2.Vpc("vpc",
cidr_block="10.100.0.0/16",
instance_tenancy="default")
policy = aws.iam.Policy("policy",
description="test",
policy=pulumi.Output.json_dumps({
"Version": "2012-10-17",
"Interpolated": vpc.arn.apply(lambda arn: f"arn:{arn}:value"),
"Value": vpc.id,
}))
```
### Generated C# Before
```csharp
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var vpc = new Aws.Ec2.Vpc("vpc", new()
{
CidrBlock = "10.100.0.0/16",
InstanceTenancy = "default",
});
var policy = new Aws.Iam.Policy("policy", new()
{
Description = "test",
PolicyDocument = Output.Tuple(vpc.Arn, vpc.Id).Apply(values =>
{
var arn = values.Item1;
var id = values.Item2;
return JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Interpolated"] = $"arn:{arn}:value",
["Value"] = id,
});
}),
});
});
```
### Generated C# After
```csharp
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var vpc = new Aws.Ec2.Vpc("vpc", new()
{
CidrBlock = "10.100.0.0/16",
InstanceTenancy = "default",
});
var policy = new Aws.Iam.Policy("policy", new()
{
Description = "test",
PolicyDocument = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Interpolated"] = vpc.Arn.Apply(arn => $"arn:{arn}:value"),
["Value"] = vpc.Id,
})),
});
});
```
## Checklist
- [ ] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-20 15:48:46 +00:00
|
|
|
[]string{ex, "new", "console", "-f", "net6.0"}, dir, &integration.ProgramTestOptions{})
|
2022-03-16 18:42:30 +00:00
|
|
|
require.NoError(t, err, "Failed to create C# project")
|
|
|
|
|
2022-07-21 19:04:02 +00:00
|
|
|
// Remove Program.cs again generated from "dotnet new console"
|
|
|
|
// because the generated C# program already has an entry point
|
|
|
|
if err = os.Remove(programFile); !os.IsNotExist(err) {
|
|
|
|
require.NoError(t, err)
|
|
|
|
}
|
|
|
|
|
2022-03-16 18:42:30 +00:00
|
|
|
// Add dependencies
|
|
|
|
pkgs := dotnetDependencies(dependencies)
|
|
|
|
if len(pkgs) != 0 {
|
|
|
|
for _, pkg := range pkgs {
|
|
|
|
pkg.install(t, ex, dir)
|
|
|
|
}
|
[program-gen] Emit Output-returning JSON serialization methods without rewriting applies (#15371)
### Description
A while ago we started implementing [specialized JSON serialization
methods](https://github.com/pulumi/pulumi/issues/12519) for Pulumi
programs which can accept nested outputs without having to rewrite and
combine applies.
- `Output.SerializeJson` in .NET
- `pulumi.jsonStringify` in nodejs
- `pulumi.Output.json_dumps` in Python
This PR extends program-gen for TypeScript, C# and Python to start
emitting these JSON serialization functions (when necessary). The PR
special-cases the `toJSON` PCL function when rewriting applies so that
nested outputs aren't rewritted.
Example PCL program and generated results:
> Also check out the downstream codegen tests to see improved generated
examples
```
resource vpc "aws:ec2:Vpc" {
cidrBlock = "10.100.0.0/16"
instanceTenancy = "default"
}
resource policy "aws:iam/policy:Policy" {
description = "test"
policy = toJSON({
"Version" = "2012-10-17"
"Interpolated" = "arn:${vpc.arn}:value"
"Value" = vpc.id
})
}
```
### Generated TypeScript Before
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpc = new aws.ec2.Vpc("vpc", {
cidrBlock: "10.100.0.0/16",
instanceTenancy: "default",
});
const policy = new aws.iam.Policy("policy", {
description: "test",
policy: pulumi.all([vpc.arn, vpc.id]).apply(([arn, id]) => JSON.stringify({
Version: "2012-10-17",
Interpolated: `arn:${arn}:value`,
Value: id,
})),
});
```
### Generated TypeScript After
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpc = new aws.ec2.Vpc("vpc", {
cidrBlock: "10.100.0.0/16",
instanceTenancy: "default",
});
const policy = new aws.iam.Policy("policy", {
description: "test",
policy: pulumi.jsonStringify({
Version: "2012-10-17",
Interpolated: pulumi.interpolate`arn:${vpc.arn}:value`,
Value: vpc.id,
}),
});
```
### Generated Python Before
```python
import pulumi
import json
import pulumi_aws as aws
vpc = aws.ec2.Vpc("vpc",
cidr_block="10.100.0.0/16",
instance_tenancy="default")
policy = aws.iam.Policy("policy",
description="test",
policy=pulumi.Output.all(vpc.arn, vpc.id).apply(lambda arn, id: json.dumps({
"Version": "2012-10-17",
"Interpolated": f"arn:{arn}:value",
"Value": id,
})))
```
### Generated Python After
```python
import pulumi
import json
import pulumi_aws as aws
vpc = aws.ec2.Vpc("vpc",
cidr_block="10.100.0.0/16",
instance_tenancy="default")
policy = aws.iam.Policy("policy",
description="test",
policy=pulumi.Output.json_dumps({
"Version": "2012-10-17",
"Interpolated": vpc.arn.apply(lambda arn: f"arn:{arn}:value"),
"Value": vpc.id,
}))
```
### Generated C# Before
```csharp
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var vpc = new Aws.Ec2.Vpc("vpc", new()
{
CidrBlock = "10.100.0.0/16",
InstanceTenancy = "default",
});
var policy = new Aws.Iam.Policy("policy", new()
{
Description = "test",
PolicyDocument = Output.Tuple(vpc.Arn, vpc.Id).Apply(values =>
{
var arn = values.Item1;
var id = values.Item2;
return JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Interpolated"] = $"arn:{arn}:value",
["Value"] = id,
});
}),
});
});
```
### Generated C# After
```csharp
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var vpc = new Aws.Ec2.Vpc("vpc", new()
{
CidrBlock = "10.100.0.0/16",
InstanceTenancy = "default",
});
var policy = new Aws.Iam.Policy("policy", new()
{
Description = "test",
PolicyDocument = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Interpolated"] = vpc.Arn.Apply(arn => $"arn:{arn}:value"),
["Value"] = vpc.Id,
})),
});
});
```
## Checklist
- [ ] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-20 15:48:46 +00:00
|
|
|
dep{"Pulumi", test.PulumiDotnetSDKVersion}.install(t, ex, dir)
|
2022-03-16 18:42:30 +00:00
|
|
|
} else {
|
|
|
|
// We would like this regardless of other dependencies, but dotnet
|
|
|
|
// packages do not play well with package references.
|
|
|
|
if pulumiSDKPath != "" {
|
|
|
|
err = integration.RunCommand(t, "add sdk ref",
|
|
|
|
[]string{ex, "add", "reference", pulumiSDKPath},
|
|
|
|
dir, &integration.ProgramTestOptions{})
|
|
|
|
require.NoError(t, err, "Failed to dotnet sdk package reference")
|
|
|
|
} else {
|
[program-gen] Emit Output-returning JSON serialization methods without rewriting applies (#15371)
### Description
A while ago we started implementing [specialized JSON serialization
methods](https://github.com/pulumi/pulumi/issues/12519) for Pulumi
programs which can accept nested outputs without having to rewrite and
combine applies.
- `Output.SerializeJson` in .NET
- `pulumi.jsonStringify` in nodejs
- `pulumi.Output.json_dumps` in Python
This PR extends program-gen for TypeScript, C# and Python to start
emitting these JSON serialization functions (when necessary). The PR
special-cases the `toJSON` PCL function when rewriting applies so that
nested outputs aren't rewritted.
Example PCL program and generated results:
> Also check out the downstream codegen tests to see improved generated
examples
```
resource vpc "aws:ec2:Vpc" {
cidrBlock = "10.100.0.0/16"
instanceTenancy = "default"
}
resource policy "aws:iam/policy:Policy" {
description = "test"
policy = toJSON({
"Version" = "2012-10-17"
"Interpolated" = "arn:${vpc.arn}:value"
"Value" = vpc.id
})
}
```
### Generated TypeScript Before
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpc = new aws.ec2.Vpc("vpc", {
cidrBlock: "10.100.0.0/16",
instanceTenancy: "default",
});
const policy = new aws.iam.Policy("policy", {
description: "test",
policy: pulumi.all([vpc.arn, vpc.id]).apply(([arn, id]) => JSON.stringify({
Version: "2012-10-17",
Interpolated: `arn:${arn}:value`,
Value: id,
})),
});
```
### Generated TypeScript After
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const vpc = new aws.ec2.Vpc("vpc", {
cidrBlock: "10.100.0.0/16",
instanceTenancy: "default",
});
const policy = new aws.iam.Policy("policy", {
description: "test",
policy: pulumi.jsonStringify({
Version: "2012-10-17",
Interpolated: pulumi.interpolate`arn:${vpc.arn}:value`,
Value: vpc.id,
}),
});
```
### Generated Python Before
```python
import pulumi
import json
import pulumi_aws as aws
vpc = aws.ec2.Vpc("vpc",
cidr_block="10.100.0.0/16",
instance_tenancy="default")
policy = aws.iam.Policy("policy",
description="test",
policy=pulumi.Output.all(vpc.arn, vpc.id).apply(lambda arn, id: json.dumps({
"Version": "2012-10-17",
"Interpolated": f"arn:{arn}:value",
"Value": id,
})))
```
### Generated Python After
```python
import pulumi
import json
import pulumi_aws as aws
vpc = aws.ec2.Vpc("vpc",
cidr_block="10.100.0.0/16",
instance_tenancy="default")
policy = aws.iam.Policy("policy",
description="test",
policy=pulumi.Output.json_dumps({
"Version": "2012-10-17",
"Interpolated": vpc.arn.apply(lambda arn: f"arn:{arn}:value"),
"Value": vpc.id,
}))
```
### Generated C# Before
```csharp
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var vpc = new Aws.Ec2.Vpc("vpc", new()
{
CidrBlock = "10.100.0.0/16",
InstanceTenancy = "default",
});
var policy = new Aws.Iam.Policy("policy", new()
{
Description = "test",
PolicyDocument = Output.Tuple(vpc.Arn, vpc.Id).Apply(values =>
{
var arn = values.Item1;
var id = values.Item2;
return JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Interpolated"] = $"arn:{arn}:value",
["Value"] = id,
});
}),
});
});
```
### Generated C# After
```csharp
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var vpc = new Aws.Ec2.Vpc("vpc", new()
{
CidrBlock = "10.100.0.0/16",
InstanceTenancy = "default",
});
var policy = new Aws.Iam.Policy("policy", new()
{
Description = "test",
PolicyDocument = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Interpolated"] = vpc.Arn.Apply(arn => $"arn:{arn}:value"),
["Value"] = vpc.Id,
})),
});
});
```
## Checklist
- [ ] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
- [x] I have formatted my code using `gofumpt`
<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!---
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-02-20 15:48:46 +00:00
|
|
|
dep{"Pulumi", test.PulumiDotnetSDKVersion}.install(t, ex, dir)
|
2022-03-16 18:42:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Clean up build result
|
|
|
|
defer func() {
|
|
|
|
err = os.RemoveAll(filepath.Join(dir, "bin"))
|
|
|
|
assert.NoError(t, err, "Failed to remove bin result")
|
|
|
|
err = os.RemoveAll(filepath.Join(dir, "obj"))
|
|
|
|
assert.NoError(t, err, "Failed to remove obj result")
|
|
|
|
}()
|
2022-05-24 01:11:20 +00:00
|
|
|
TypeCheck(t, path, dependencies, pulumiSDKPath)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TypeCheck(t *testing.T, path string, dependencies codegen.StringSet, pulumiSDKPath string) {
|
|
|
|
var err error
|
|
|
|
dir := filepath.Dir(path)
|
|
|
|
|
|
|
|
ex, err := executable.FindExecutable("dotnet")
|
|
|
|
require.NoError(t, err)
|
|
|
|
|
2022-03-16 18:42:30 +00:00
|
|
|
err = integration.RunCommand(t, "dotnet build",
|
|
|
|
[]string{ex, "build", "--nologo"}, dir, &integration.ProgramTestOptions{})
|
|
|
|
require.NoError(t, err, "Failed to build dotnet project")
|
|
|
|
}
|
|
|
|
|
|
|
|
type dep struct {
|
|
|
|
Name string
|
|
|
|
Version string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (pkg dep) install(t *testing.T, ex, dir string) {
|
|
|
|
args := []string{ex, "add", "package", pkg.Name}
|
|
|
|
if pkg.Version != "" {
|
|
|
|
args = append(args, "--version", pkg.Version)
|
|
|
|
}
|
|
|
|
err := integration.RunCommand(t, "Add package",
|
|
|
|
args, dir, &integration.ProgramTestOptions{})
|
|
|
|
require.NoError(t, err, "Failed to add dependency %q %q", pkg.Name, pkg.Version)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Converts from the hcl2 dependency format to the dotnet format.
|
|
|
|
//
|
|
|
|
// Example:
|
|
|
|
//
|
2022-09-14 02:12:02 +00:00
|
|
|
// "aws" => {"Pulumi.Aws", 4.21.1}
|
|
|
|
// "azure" => {"Pulumi.Azure", 4.21.1}
|
2022-03-16 18:42:30 +00:00
|
|
|
func dotnetDependencies(deps codegen.StringSet) []dep {
|
|
|
|
result := make([]dep, len(deps))
|
|
|
|
for i, d := range deps.SortedValues() {
|
|
|
|
switch d {
|
|
|
|
case "aws":
|
|
|
|
result[i] = dep{"Pulumi.Aws", test.AwsSchema}
|
|
|
|
case "azure-native":
|
|
|
|
result[i] = dep{"Pulumi.AzureNative", test.AzureNativeSchema}
|
|
|
|
case "azure":
|
2022-07-21 19:04:02 +00:00
|
|
|
// TODO: update constant in test.AzureSchema to v5.x
|
|
|
|
// because it has output-versioned function invokes
|
|
|
|
result[i] = dep{"Pulumi.Azure", "5.12.0"}
|
2022-03-16 18:42:30 +00:00
|
|
|
case "kubernetes":
|
|
|
|
result[i] = dep{"Pulumi.Kubernetes", test.KubernetesSchema}
|
|
|
|
case "random":
|
|
|
|
result[i] = dep{"Pulumi.Random", test.RandomSchema}
|
2024-03-10 17:23:15 +00:00
|
|
|
case "aws-static-website":
|
|
|
|
result[i] = dep{"Pulumi.AwsStaticWebsite", test.AwsStaticWebsiteSchema}
|
2024-03-24 00:06:57 +00:00
|
|
|
case "aws-native":
|
|
|
|
result[i] = dep{"Pulumi.AwsNative", test.AwsNativeSchema}
|
2022-03-16 18:42:30 +00:00
|
|
|
default:
|
2023-12-12 12:19:42 +00:00
|
|
|
result[i] = dep{"Pulumi." + Title(d), ""}
|
2022-03-16 18:42:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return result
|
|
|
|
}
|
2022-10-17 05:56:57 +00:00
|
|
|
|
|
|
|
func GenerateProgramBatchTest(t *testing.T, testCases []test.ProgramTest) {
|
|
|
|
test.TestProgramCodegen(t,
|
|
|
|
test.ProgramCodegenOptions{
|
|
|
|
Language: "dotnet",
|
|
|
|
Extension: "cs",
|
|
|
|
OutputFile: "Program.cs",
|
|
|
|
Check: func(t *testing.T, path string, dependencies codegen.StringSet) {
|
2022-12-13 10:51:55 +00:00
|
|
|
Check(t, path, dependencies, "")
|
2022-10-17 05:56:57 +00:00
|
|
|
},
|
|
|
|
GenProgram: GenerateProgram,
|
|
|
|
TestCases: testCases,
|
|
|
|
},
|
|
|
|
)
|
|
|
|
}
|