Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
[UTY-2392] Port test-project to new CodeWriter (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Balaji authored Jan 16, 2020
1 parent 4cb620d commit 4df80cb
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 42 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Implemented a new CodeWriter in the code generator which provides a fluent interface for generating C# code. [#1237](https://github.com/spatialos/gdk-for-unity/pull/1237)
- The `CodeGenerationLib` has been migrated to the new `CodeWriter`.
- Added support for defining namespaces, structs, classes, enums and methods in the new CodeWriter. [#1239](https://github.com/spatialos/gdk-for-unity/pull/1239)
- Ported test-project to new CodeWriter. [#1241](https://github.com/spatialos/gdk-for-unity/pull/1241)

## `0.3.2` - 2019-12-23

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ===========
// =====================================================
// DO NOT EDIT - this file is automatically regenerated.
// ===========
// =====================================================

using System;
using System.Collections.Generic;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Improbable.Gdk.CodeGeneration.CodeWriter;

namespace Improbable.Gdk.CodeGenerator
{
public static class ModularCodegenTestGenerator
{
public static string Generate()
{
return CodeWriter.Populate(cgw =>
{
cgw.Namespace("Improbable.Gdk.ModularCodegenTests", ns =>
{
ns.Type("public class TemplateTest", t =>
{
});
});
}).Format();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public TestCodegenJob(string baseOutputDir, IFileSystem fileSystem, DetailsStore
protected override void RunImpl()
{
AddContent(relativeOutputPath, testContent);
AddContent(relativeTemplateOutputPath, new ModularCodegenTestGenerator().Generate());
AddContent(relativeTemplateOutputPath, ModularCodegenTestGenerator.Generate());
}
}
}

This file was deleted.

0 comments on commit 4df80cb

Please sign in to comment.