aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-01-30 00:28:05 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-01-30 00:28:05 +0100
commitc29275576f75534c9fd109b3d3717ab52ec8415b (patch)
tree2bb12851411af33988a43ea9a35bfe4ee34eba83 /Tests
parente3c509d4a9a27f663a3a95ab697bfdb2e880172d (diff)
- test with both parameterless ctor and with iface param ctorInCodeInstatiation
- CurrentInterface as field
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BasicTests.cs2
-rw-r--r--Tests/HelloCube.cs2
-rw-r--r--Tests/HelloWorld.cs13
-rw-r--r--Tests/Showcase.cs3
-rw-r--r--Tests/Tests.csproj1
5 files changed, 15 insertions, 6 deletions
diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs
index 8d0a8026..6adabf6c 100644
--- a/Tests/BasicTests.cs
+++ b/Tests/BasicTests.cs
@@ -141,7 +141,7 @@ namespace Tests
//testFiles = new string [] { @"Interfaces/Unsorted/testFileDialog.crow" };
//testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
- testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+ testFiles = new string [] { @"Interfaces/TemplatedContainer/testTabView.crow" };
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray ();
diff --git a/Tests/HelloCube.cs b/Tests/HelloCube.cs
index aa460025..d44a9bff 100644
--- a/Tests/HelloCube.cs
+++ b/Tests/HelloCube.cs
@@ -69,7 +69,7 @@ namespace Tests
base.OnLoad (e);
AddWidget(
- new Window ()
+ new Window (this.CurrentInterface)
{
Caption = "Hello World"
}
diff --git a/Tests/HelloWorld.cs b/Tests/HelloWorld.cs
index ca1560ef..ea37a142 100644
--- a/Tests/HelloWorld.cs
+++ b/Tests/HelloWorld.cs
@@ -40,9 +40,18 @@ namespace Tests
{
base.OnLoad (e);
+ Container c = (Container) Instantiator.CreateFromImlFragment (@"<Border BorderWidth='1' Background='Red' Foreground='White' Width='50%'></Border>").CreateInstance (CurrentInterface);
+ GraphicObject obj = new GraphicObject (this.CurrentInterface)
+ {
+ Background = Color.AirForceBlueRaf,
+ Margin = 10,
+ Width = 100,
+ Height = 100
+ };
+ c.SetChild (obj);
+ AddWidget (c);
- AddWidget(Instantiator.CreateFromImlFragment (@"<Border Fit='true' BorderWidth='2' BorderStyle='Normal' MouseDown='{BorderStyle=Sunken}' MouseUp='{BorderStyle=Raised}' MouseEnter='{BorderStyle=Raised}' MouseLeave='{BorderStyle=Normal}'><Label Margin='50'/></Border>").CreateInstance (CurrentInterface));
- //Load(@"Interfaces/GraphicObject/0.crow");
+ //Load(@"Interfaces/GraphicObject/2.crow");
}
[STAThread]
diff --git a/Tests/Showcase.cs b/Tests/Showcase.cs
index 4880ede5..67ef5eef 100644
--- a/Tests/Showcase.cs
+++ b/Tests/Showcase.cs
@@ -32,6 +32,7 @@ using System.IO;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
+using System.Text;
namespace Tests
{
@@ -106,7 +107,7 @@ namespace Tests
try {
lock (this.ifaceControl [0].CrowInterface.UpdateMutex) {
Instantiator inst = null;
- using (MemoryStream ms = new MemoryStream (System.Text.Encoding.Unicode.GetBytes (e.Text))){
+ using (MemoryStream ms = new MemoryStream (Encoding.UTF8.GetBytes (e.Text))){
inst = new Instantiator (ms);
}
g = inst.CreateInstance (this.ifaceControl [0].CrowInterface);
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index 2adcdb16..38152f0b 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -50,7 +50,6 @@
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
- <Compile Include="Interfaces\testBorder.goml.cs" />
<Compile Include="BasicTests.cs" />
<Compile Include="OpenGL\Shader.cs" />
<Compile Include="OpenGL\vaoMesh.cs" />