Skip to content

Commit 08608c3

Browse files
committed
why my codes are loss
1 parent eeda4eb commit 08608c3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

CmcTest/StructTests.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
using System.Linq;
1+
using System.Collections.Generic;
2+
using System.Linq;
23
using Cmc;
34
using Cmc.Core;
45
using Cmc.Decl;
6+
using Cmc.Expr;
57
using Cmc.Stmt;
68
using Microsoft.VisualStudio.TestTools.UnitTesting;
79

@@ -14,6 +16,14 @@ public class StructTests
1416
public void StructTest1()
1517
{
1618
var @struct = new StatementList(MetaData.Empty,
19+
new StructDeclaration(MetaData.Empty, "Person",
20+
new List<VariableDeclaration>(new[]
21+
{
22+
new VariableDeclaration(MetaData.Empty, "name",
23+
new StringLiteralExpression(MetaData.Empty, "ice")),
24+
new VariableDeclaration(MetaData.Empty, "gender",
25+
new IntLiteralExpression(MetaData.Empty, "123", false))
26+
})),
1727
new VariableDeclaration(MetaData.Empty, "var", type:
1828
new UnknownType(MetaData.Empty, "Person")));
1929
@struct.SurroundWith(Environment.SolarSystem);

0 commit comments

Comments
 (0)