efl_mono: Update tests and examples after rename
Summary: Separated from the generator and libs for easier review Depends on D6050 Reviewers: felipealmeida, vitor.sousa Reviewed By: vitor.sousa Subscribers: cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D6051
This commit is contained in:
parent
4636d6e0eb
commit
fe7106d460
|
@ -2,7 +2,7 @@ using static System.Console;
|
|||
|
||||
class PlusTenNumberWrapper : example.NumberwrapperInherit
|
||||
{
|
||||
public PlusTenNumberWrapper(efl.Object parent = null)
|
||||
public PlusTenNumberWrapper(efl.IObject parent = null)
|
||||
: base(parent)
|
||||
{}
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class ExampleEoInherit01
|
|||
WriteLine("## Using original object ##\n");
|
||||
|
||||
// Check original EFL object
|
||||
var origObj = new example.NumberwrapperConcrete();
|
||||
var origObj = new example.Numberwrapper();
|
||||
given = 111;
|
||||
origObj.SetNumber(given);
|
||||
stored = origObj.GetNumber();
|
||||
|
|
|
@ -15,7 +15,7 @@ public class ExampleFunctionPointer01
|
|||
eina.Config.Init();
|
||||
efl.eo.Config.Init();
|
||||
|
||||
var obj = new example.NumberwrapperConcrete();
|
||||
var obj = new example.Numberwrapper();
|
||||
|
||||
// Set internal value
|
||||
obj.SetNumber(12);
|
||||
|
|
|
@ -2,11 +2,11 @@ using System;
|
|||
|
||||
public class Example
|
||||
{
|
||||
public static efl.ui.Button CreateButton(efl.Object parent,
|
||||
public static efl.ui.IButton CreateButton(efl.IObject parent,
|
||||
string text,
|
||||
int w, int h,
|
||||
EventHandler callback) {
|
||||
efl.ui.Button button = new efl.ui.ButtonConcrete(parent);
|
||||
efl.ui.IButton button = new efl.ui.Button(parent);
|
||||
button.SetText(text);
|
||||
button.SetSize(new eina.Size2D(w, h));
|
||||
|
||||
|
@ -36,32 +36,32 @@ public class Example
|
|||
|
||||
efl.All.Init(efl.Components.Ui);
|
||||
|
||||
efl.ui.Win win = new efl.ui.WinConcrete(null);
|
||||
efl.ui.Win win = new efl.ui.Win(null);
|
||||
win.SetText("Hello, C#!!");
|
||||
win.SetAutohide(true);
|
||||
|
||||
efl.ui.Box_Flow box = new efl.ui.Box_FlowConcrete(win);
|
||||
efl.ui.Box_Flow box = new efl.ui.Box_Flow(win);
|
||||
|
||||
efl.ui.Button button = CreateButton(box, "Click to exit", 120, 30,
|
||||
efl.ui.IButton button = CreateButton(box, "Click to exit", 120, 30,
|
||||
(object sender, EventArgs e) => {
|
||||
efl.ui.Config.Exit();
|
||||
});
|
||||
|
||||
box.Pack(button);
|
||||
box.DoPack(button);
|
||||
|
||||
efl.ui.Progressbar bar = new efl.ui.ProgressbarConcrete(box);
|
||||
efl.ui.Progressbar bar = new efl.ui.Progressbar(box);
|
||||
bar.SetSize(new eina.Size2D(W, H));
|
||||
bar.SetFormatCb(Formatter);
|
||||
|
||||
efl.ui.Slider slider = new efl.ui.SliderConcrete(box);
|
||||
efl.ui.ISlider slider = new efl.ui.Slider(box);
|
||||
slider.SetSize(new eina.Size2D(W, H));
|
||||
|
||||
slider.ChangedEvt += (object sender, EventArgs e) => {
|
||||
bar.SetRangeValue(slider.GetRangeValue());
|
||||
};
|
||||
|
||||
box.Pack(bar);
|
||||
box.Pack(slider);
|
||||
box.DoPack(bar);
|
||||
box.DoPack(slider);
|
||||
|
||||
button.SetVisible(true);
|
||||
box.SetVisible(true);
|
||||
|
|
|
@ -16,14 +16,14 @@ public class Example
|
|||
|
||||
private static void ShowErrorPopup(efl.ui.Win win, string message)
|
||||
{
|
||||
efl.ui.Popup_Alert popup = new efl.ui.Popup_AlertConcrete(win);
|
||||
efl.ui.Text popup_text = new efl.ui.TextConcrete(popup);
|
||||
efl.ui.IPopup_Alert popup = new efl.ui.Popup_Alert(win);
|
||||
efl.ui.Text popup_text = new efl.ui.Text(popup);
|
||||
popup_text.SetText($"Error: {message}");
|
||||
popup.SetContent(popup_text);
|
||||
popup.SetVisible(true);
|
||||
popup.SetButton(efl.ui.Popup_Alert_Button.Positive, "Ok");
|
||||
popup.SetSize(new eina.Size2D(150, 30));
|
||||
popup.ButtonClickedEvt += (object sender, efl.ui.Popup_AlertConcrete.ButtonClickedEvt_Args e) => {
|
||||
popup.ButtonClickedEvt += (object sender, efl.ui.Popup_Alert.ButtonClickedEvt_Args e) => {
|
||||
popup.SetParent(null);
|
||||
popup.Del();
|
||||
};
|
||||
|
@ -41,63 +41,63 @@ public class Example
|
|||
|
||||
efl.All.Init(efl.Components.Ui);
|
||||
|
||||
efl.ui.Win win = new efl.ui.WinConcrete(null);
|
||||
efl.ui.Win win = new efl.ui.Win(null);
|
||||
win.SetText("C# Unit Converter");
|
||||
win.SetAutohide(true);
|
||||
|
||||
efl.ui.Box_Flow box = new efl.ui.Box_FlowConcrete(win);
|
||||
efl.ui.Box_Flow box = new efl.ui.Box_Flow(win);
|
||||
box.SetDirection(efl.ui.Dir.Horizontal);
|
||||
|
||||
efl.ui.Box_Flow miles_box = new efl.ui.Box_FlowConcrete(box);
|
||||
efl.ui.Box_Flow miles_box = new efl.ui.Box_Flow(box);
|
||||
miles_box.SetDirection(efl.ui.Dir.Down);
|
||||
|
||||
box.Pack(miles_box);
|
||||
box.DoPack(miles_box);
|
||||
|
||||
efl.ui.Text miles_label = new efl.ui.TextConcrete(miles_box);
|
||||
efl.ui.Text miles_label = new efl.ui.Text(miles_box);
|
||||
miles_label.SetText("Miles:");
|
||||
miles_label.SetSize(size);
|
||||
miles_label.SetVisible(true);
|
||||
|
||||
efl.ui.Text_Editable miles_input = new efl.ui.Text_EditableConcrete(miles_box);
|
||||
efl.ui.Text_Editable miles_input = new efl.ui.Text_Editable(miles_box);
|
||||
miles_input.SetText("");
|
||||
miles_input.SetScrollable(true);
|
||||
miles_input.SetSize(size);
|
||||
miles_input.SetVisible(true);
|
||||
|
||||
efl.ui.Button miles_button = new efl.ui.ButtonConcrete(miles_box);
|
||||
efl.ui.IButton miles_button = new efl.ui.Button(miles_box);
|
||||
miles_button.SetText("To Km");
|
||||
miles_button.SetSize(size);
|
||||
miles_button.SetVisible(true);
|
||||
|
||||
miles_box.Pack(miles_label);
|
||||
miles_box.Pack(miles_input);
|
||||
miles_box.Pack(miles_button);
|
||||
miles_box.DoPack(miles_label);
|
||||
miles_box.DoPack(miles_input);
|
||||
miles_box.DoPack(miles_button);
|
||||
|
||||
|
||||
efl.ui.Box_Flow kms_box = new efl.ui.Box_FlowConcrete(box);
|
||||
efl.ui.Box_Flow kms_box = new efl.ui.Box_Flow(box);
|
||||
kms_box.SetDirection(efl.ui.Dir.Down);
|
||||
|
||||
box.Pack(kms_box);
|
||||
box.DoPack(kms_box);
|
||||
|
||||
efl.ui.Text kms_label = new efl.ui.TextConcrete(kms_box);
|
||||
efl.ui.Text kms_label = new efl.ui.Text(kms_box);
|
||||
kms_label.SetText("Kilometers:");
|
||||
kms_label.SetSize(size);
|
||||
kms_label.SetVisible(true);
|
||||
|
||||
efl.ui.Text_Editable kms_input = new efl.ui.Text_EditableConcrete(kms_box);
|
||||
efl.ui.Text_Editable kms_input = new efl.ui.Text_Editable(kms_box);
|
||||
kms_input.SetText("");
|
||||
kms_input.SetScrollable(true);
|
||||
kms_input.SetSize(size);
|
||||
kms_input.SetVisible(true);
|
||||
|
||||
efl.ui.Button kms_button = new efl.ui.ButtonConcrete(kms_box);
|
||||
efl.ui.IButton kms_button = new efl.ui.Button(kms_box);
|
||||
kms_button.SetText("To Miles");
|
||||
kms_button.SetSize(size);
|
||||
kms_button.SetVisible(true);
|
||||
|
||||
kms_box.Pack(kms_label);
|
||||
kms_box.Pack(kms_input);
|
||||
kms_box.Pack(kms_button);
|
||||
kms_box.DoPack(kms_label);
|
||||
kms_box.DoPack(kms_input);
|
||||
kms_box.DoPack(kms_button);
|
||||
|
||||
kms_button.ClickedEvt += (object sender, EventArgs e) => {
|
||||
try
|
||||
|
|
|
@ -4,7 +4,7 @@ using System.Runtime.CompilerServices;
|
|||
|
||||
public class MyBox : evas.BoxInherit
|
||||
{
|
||||
public MyBox(efl.Object parent) : base(parent) {}
|
||||
public MyBox(efl.IObject parent) : base(parent) {}
|
||||
|
||||
[DllImport("evas")] static extern void evas_obj_box_layout_vertical(IntPtr obj, IntPtr data, IntPtr privdata);
|
||||
[DllImport("evas")] static extern void evas_obj_box_layout_horizontal(IntPtr obj, IntPtr data, IntPtr privdata);
|
||||
|
@ -32,18 +32,18 @@ class TestMain
|
|||
{
|
||||
efl.All.Init();
|
||||
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.Loop loop = new efl.Loop();
|
||||
|
||||
|
||||
EcoreEvas ecore_evas = new EcoreEvas();
|
||||
|
||||
efl.canvas.Object canvas = ecore_evas.canvas;
|
||||
efl.canvas.IObject canvas = ecore_evas.canvas;
|
||||
canvas.SetVisible(true);
|
||||
|
||||
efl.Object parent = canvas.GetParent();
|
||||
efl.IObject parent = canvas.GetParent();
|
||||
System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
|
||||
|
||||
evas.Box box = new MyBox(canvas);
|
||||
evas.IBox box = new MyBox(canvas);
|
||||
eina.Size2D size = new eina.Size2D();
|
||||
|
||||
size.W = 320;
|
||||
|
@ -52,7 +52,7 @@ class TestMain
|
|||
box.SetSize(size);
|
||||
box.SetVisible(true);
|
||||
|
||||
efl.canvas.Rectangle rect = new efl.canvas.RectangleConcrete(canvas);
|
||||
efl.canvas.Rectangle rect = new efl.canvas.Rectangle(canvas);
|
||||
rect.SetColor(0, 0, 255, 255);
|
||||
size.W = 320;
|
||||
size.H = 120;
|
||||
|
@ -60,7 +60,7 @@ class TestMain
|
|||
rect.SetVisible(true);
|
||||
box.Append(rect);
|
||||
|
||||
efl.canvas.Rectangle rect2 = new efl.canvas.RectangleConcrete(canvas);
|
||||
efl.canvas.Rectangle rect2 = new efl.canvas.Rectangle(canvas);
|
||||
rect2.SetColor(0, 255, 0, 255);
|
||||
rect2.SetSize(size);
|
||||
rect2.SetVisible(true);
|
||||
|
|
|
@ -6,7 +6,7 @@ class TestMain
|
|||
static int WIDTH = 320;
|
||||
static int HEIGHT = 240;
|
||||
|
||||
evas.Image image;
|
||||
evas.IImage image;
|
||||
|
||||
|
||||
static string ImagePath([CallerFilePath] string folder="")
|
||||
|
@ -14,7 +14,7 @@ class TestMain
|
|||
return System.IO.Path.GetDirectoryName(folder);
|
||||
}
|
||||
|
||||
public TestMain(evas.Image image)
|
||||
public TestMain(evas.IImage image)
|
||||
{
|
||||
this.image = image;
|
||||
}
|
||||
|
@ -23,18 +23,18 @@ class TestMain
|
|||
{
|
||||
efl.All.Init();
|
||||
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.Loop loop = new efl.Loop();
|
||||
|
||||
EcoreEvas ecore_evas = new EcoreEvas();
|
||||
eina.Size2D size = new eina.Size2D();
|
||||
|
||||
efl.canvas.Object canvas = ecore_evas.canvas;
|
||||
efl.canvas.IObject canvas = ecore_evas.canvas;
|
||||
canvas.SetVisible(true);
|
||||
|
||||
efl.Object parent = canvas.GetParent();
|
||||
efl.IObject parent = canvas.GetParent();
|
||||
System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
|
||||
|
||||
efl.canvas.Rectangle bg = new efl.canvas.RectangleConcrete(canvas);
|
||||
efl.canvas.Rectangle bg = new efl.canvas.Rectangle(canvas);
|
||||
bg.SetColor(255, 255, 255, 255);
|
||||
size.W = WIDTH;
|
||||
size.H = HEIGHT;
|
||||
|
@ -42,7 +42,7 @@ class TestMain
|
|||
bg.SetVisible(true);
|
||||
|
||||
string valid_path = args[0];
|
||||
evas.Image image = new evas.ImageConcrete(canvas);
|
||||
evas.Image image = new evas.Image(canvas);
|
||||
image.SetFile(valid_path, null);
|
||||
|
||||
/* FIXME evas-image uses error handling code from
|
||||
|
|
|
@ -12,17 +12,17 @@ class TestMain
|
|||
{
|
||||
efl.All.Init();
|
||||
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.Loop loop = new efl.Loop();
|
||||
|
||||
EcoreEvas ecore_evas = new EcoreEvas();
|
||||
|
||||
eina.Size2D size = new eina.Size2D();
|
||||
eina.Position2D pos = new eina.Position2D();
|
||||
|
||||
efl.canvas.Object canvas = ecore_evas.canvas;
|
||||
efl.canvas.IObject canvas = ecore_evas.canvas;
|
||||
canvas.SetVisible(true);
|
||||
|
||||
efl.canvas.Rectangle bg = new efl.canvas.RectangleConcrete(canvas);
|
||||
efl.canvas.Rectangle bg = new efl.canvas.Rectangle(canvas);
|
||||
bg.SetColor(255, 255, 255, 255);
|
||||
pos.X = 0;
|
||||
pos.Y = 0;
|
||||
|
@ -33,7 +33,7 @@ class TestMain
|
|||
bg.SetVisible(true);
|
||||
|
||||
string path = args[0];
|
||||
evas.Image logo = new evas.ImageConcrete(canvas);
|
||||
evas.Image logo = new evas.Image(canvas);
|
||||
logo.SetFillAuto(true);
|
||||
|
||||
// TODO add preloaded support (depends on events)
|
||||
|
@ -53,7 +53,7 @@ class TestMain
|
|||
pixels[i] = generator.Next();
|
||||
}
|
||||
|
||||
evas.Image noise_img = new evas.ImageConcrete(canvas);
|
||||
evas.Image noise_img = new evas.Image(canvas);
|
||||
size.W = WIDTH / 4;
|
||||
size.H = HEIGHT / 4;
|
||||
noise_img.SetSize(size);
|
||||
|
@ -66,7 +66,7 @@ class TestMain
|
|||
noise_img.SetVisible(true);
|
||||
Console.WriteLine("Creating noise image with sizez %d, %d", WIDTH/4, HEIGHT/4);
|
||||
|
||||
efl.canvas.Proxy proxy_img = new efl.canvas.ProxyConcrete(canvas);
|
||||
efl.canvas.Proxy proxy_img = new efl.canvas.Proxy(canvas);
|
||||
proxy_img.SetSource(noise_img);
|
||||
pos.X = WIDTH / 2;
|
||||
pos.Y = HEIGHT / 2;
|
||||
|
|
|
@ -14,15 +14,15 @@ class TestMain
|
|||
|
||||
efl.All.Init();
|
||||
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.Loop loop = new efl.Loop();
|
||||
EcoreEvas ecore_evas = new EcoreEvas();
|
||||
efl.canvas.Object canvas = ecore_evas.canvas;
|
||||
efl.canvas.IObject canvas = ecore_evas.canvas;
|
||||
canvas.SetVisible(true);
|
||||
|
||||
efl.Object parent = canvas.GetParent();
|
||||
efl.IObject parent = canvas.GetParent();
|
||||
System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
|
||||
|
||||
efl.canvas.Rectangle rect = new efl.canvas.RectangleConcrete(canvas);
|
||||
efl.canvas.Rectangle rect = new efl.canvas.Rectangle(canvas);
|
||||
rect.SetColor(colors[0, 0], colors[0, 1], colors[0, 2], 255);
|
||||
eina.Size2D size = new eina.Size2D();
|
||||
size.W = 640;
|
||||
|
@ -30,7 +30,7 @@ class TestMain
|
|||
rect.SetSize(size);
|
||||
rect.SetVisible(true);
|
||||
|
||||
canvas.KeyDownEvt += (object sender, efl.input.InterfaceConcrete.KeyDownEvt_Args e) => {
|
||||
canvas.KeyDownEvt += (object sender, efl.input.Interface.KeyDownEvt_Args e) => {
|
||||
color_index = (color_index + 1) % 3;
|
||||
Console.WriteLine("Key Down");
|
||||
Console.WriteLine("Got key obj at {0}", e.arg.raw_handle.ToString("X"));
|
||||
|
|
|
@ -11,7 +11,7 @@ class TestMain
|
|||
{
|
||||
efl.All.Init();
|
||||
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.Loop loop = new efl.Loop();
|
||||
|
||||
EcoreEvas ecore_evas = new EcoreEvas();
|
||||
|
||||
|
@ -21,25 +21,25 @@ class TestMain
|
|||
|
||||
eina.Size2D hint = new eina.Size2D();
|
||||
|
||||
efl.canvas.Object canvas = ecore_evas.canvas;
|
||||
efl.canvas.IObject canvas = ecore_evas.canvas;
|
||||
canvas.SetVisible(true);
|
||||
|
||||
efl.Object parent = canvas.GetParent();
|
||||
efl.IObject parent = canvas.GetParent();
|
||||
System.Diagnostics.Debug.Assert(parent.raw_handle != IntPtr.Zero);
|
||||
|
||||
efl.canvas.Rectangle bg = new efl.canvas.RectangleConcrete(canvas);
|
||||
efl.canvas.Rectangle bg = new efl.canvas.Rectangle(canvas);
|
||||
bg.SetColor(255, 255, 255, 255);
|
||||
bg.SetSize(size);
|
||||
bg.SetVisible(true);
|
||||
|
||||
|
||||
evas.Table table = new evas.TableConcrete(canvas);
|
||||
evas.Table table = new evas.Table(canvas);
|
||||
table.SetHomogeneous(evas.object_table.Homogeneous_Mode.None);
|
||||
table.SetPadding(0, 0);
|
||||
table.SetSize(size);
|
||||
table.SetVisible(true);
|
||||
|
||||
efl.canvas.Rectangle rect = new efl.canvas.RectangleConcrete(canvas);
|
||||
efl.canvas.Rectangle rect = new efl.canvas.Rectangle(canvas);
|
||||
rect.SetColor(255, 0, 0, 255);
|
||||
hint.W = 100;
|
||||
hint.H = 50;
|
||||
|
@ -47,7 +47,7 @@ class TestMain
|
|||
rect.SetVisible(true);
|
||||
table.Pack(rect, 1, 1, 2, 1);
|
||||
|
||||
rect = new efl.canvas.RectangleConcrete(canvas);
|
||||
rect = new efl.canvas.Rectangle(canvas);
|
||||
rect.SetColor(0, 255, 0, 255);
|
||||
hint.W = 50;
|
||||
hint.H = 100;
|
||||
|
@ -55,7 +55,7 @@ class TestMain
|
|||
rect.SetVisible(true);
|
||||
table.Pack(rect, 1, 2, 1, 2);
|
||||
|
||||
rect = new efl.canvas.RectangleConcrete(canvas);
|
||||
rect = new efl.canvas.Rectangle(canvas);
|
||||
rect.SetColor(0, 0, 255, 255);
|
||||
hint.W = 50;
|
||||
hint.H = 50;
|
||||
|
@ -63,7 +63,7 @@ class TestMain
|
|||
rect.SetVisible(true);
|
||||
table.Pack(rect, 2, 2, 1, 1);
|
||||
|
||||
rect = new efl.canvas.RectangleConcrete(canvas);
|
||||
rect = new efl.canvas.Rectangle(canvas);
|
||||
rect.SetColor(255, 255, 0, 255);
|
||||
rect.SetHintMin(hint);
|
||||
rect.SetVisible(true);
|
||||
|
|
|
@ -22,8 +22,8 @@ class TestMain
|
|||
static int HEIGHT = 240;
|
||||
|
||||
private EcoreEvas ecore_evas;
|
||||
private efl.canvas.Object canvas;
|
||||
private efl.canvas.Rectangle bg;
|
||||
private efl.canvas.IObject canvas;
|
||||
private efl.canvas.IRectangle bg;
|
||||
private evas.Text text;
|
||||
private evas.Image border;
|
||||
|
||||
|
@ -34,7 +34,7 @@ class TestMain
|
|||
canvas = ecore_evas.canvas;
|
||||
canvas.SetVisible(true);
|
||||
|
||||
bg = new efl.canvas.RectangleConcrete(canvas);
|
||||
bg = new efl.canvas.Rectangle(canvas);
|
||||
bg.SetColor(255, 255, 255, 255);
|
||||
position.X = 0;
|
||||
position.Y = 0;
|
||||
|
@ -47,7 +47,7 @@ class TestMain
|
|||
|
||||
bg.KeyDownEvt += On_KeyDown;
|
||||
|
||||
text = new evas.TextConcrete(canvas);
|
||||
text = new evas.Text(canvas);
|
||||
text.SetStyle(evas.Text_Style_Type.OutlineSoftShadow);
|
||||
|
||||
text.SetColor(0, 0, 0, 255);
|
||||
|
@ -71,7 +71,7 @@ class TestMain
|
|||
Console.WriteLine("Adding text object with font {0} and size {1}", font, size);
|
||||
|
||||
// setup border
|
||||
border = new evas.ImageConcrete(canvas);
|
||||
border = new evas.Image(canvas);
|
||||
border.SetFile(border_file, null);
|
||||
border.SetBorder(3, 3, 3, 3);
|
||||
border.SetBorderCenterFill(0);
|
||||
|
@ -87,7 +87,7 @@ class TestMain
|
|||
|
||||
}
|
||||
|
||||
private void On_KeyDown(object sender, efl.input.InterfaceConcrete.KeyDownEvt_Args e)
|
||||
private void On_KeyDown(object sender, efl.input.Interface.KeyDownEvt_Args e)
|
||||
{
|
||||
var key = e.arg.GetKey();
|
||||
|
||||
|
@ -114,7 +114,7 @@ class TestMain
|
|||
if (args.Length >= 1)
|
||||
border_path = args[0];
|
||||
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.Loop loop = new efl.Loop();
|
||||
TestMain t = new TestMain(border_path);
|
||||
|
||||
loop.Begin();
|
||||
|
|
|
@ -11,7 +11,7 @@ class TestIntDirections
|
|||
{
|
||||
int original = 1984;
|
||||
int received;
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
|
||||
t.IntOut(original, out received);
|
||||
|
||||
|
@ -22,7 +22,7 @@ class TestIntDirections
|
|||
{
|
||||
int original = 1984;
|
||||
int received;
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
|
||||
t.IntPtrOut(original, out received);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -14,11 +14,11 @@ class TestEo
|
|||
//
|
||||
public static void return_same_object()
|
||||
{
|
||||
test.Testing testing = new test.TestingConcrete();
|
||||
test.Testing o1 = testing.ReturnObject();
|
||||
test.ITesting testing = new test.Testing();
|
||||
test.ITesting o1 = testing.ReturnObject();
|
||||
Test.Assert(o1.raw_handle != IntPtr.Zero);
|
||||
Test.Assert(o1.raw_handle == testing.raw_handle);
|
||||
test.Testing o2 = o1.ReturnObject();
|
||||
test.ITesting o2 = o1.ReturnObject();
|
||||
Test.Assert(o2.raw_handle != IntPtr.Zero);
|
||||
Test.Assert(o2.raw_handle == o1.raw_handle);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class TestEo
|
|||
{
|
||||
bool delEventCalled = false;
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; };
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class TestEo
|
|||
{
|
||||
bool delEventCalled = false;
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.DelEvt += (object sender, EventArgs e) => { delEventCalled = true; };
|
||||
((IDisposable)obj).Dispose();
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class TestEo
|
|||
{
|
||||
bool delEventCalled = false;
|
||||
{
|
||||
test.Testing obj = new Derived();
|
||||
test.ITesting obj = new Derived();
|
||||
obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; };
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ class TestEo
|
|||
{
|
||||
bool delEventCalled = false;
|
||||
{
|
||||
test.Testing obj = new Derived();
|
||||
test.ITesting obj = new Derived();
|
||||
obj.DEL += (object sender, EventArgs e) => { delEventCalled = true; };
|
||||
((IDisposable)obj).Dispose();
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class TestEoInherit
|
|||
{
|
||||
public static void instantiate_inherited()
|
||||
{
|
||||
efl.Loop loop = new MyLoop();
|
||||
efl.ILoop loop = new MyLoop();
|
||||
Test.Assert(loop.raw_handle != System.IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ class TestEoNames
|
|||
{
|
||||
public static void name_getset()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
|
||||
string name = "Dummy";
|
||||
obj.SetName(name);
|
||||
|
@ -117,7 +117,7 @@ class TestEoConstructingMethods
|
|||
{
|
||||
bool called = false;
|
||||
string name = "Test object";
|
||||
test.Testing obj = new test.TestingConcrete(null, (test.Testing a) => {
|
||||
test.ITesting obj = new test.Testing(null, (test.ITesting a) => {
|
||||
called = true;
|
||||
Console.WriteLine("callback: obj raw_handle: {0:x}", a.raw_handle);
|
||||
a.SetName(name);
|
||||
|
@ -129,7 +129,7 @@ class TestEoConstructingMethods
|
|||
|
||||
private class Derived : test.TestingInherit
|
||||
{
|
||||
public Derived(test.Testing parent = null,
|
||||
public Derived(test.ITesting parent = null,
|
||||
test.TestingInherit.ConstructingMethod cb = null) : base(parent, cb) {
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class TestEoConstructingMethods
|
|||
{
|
||||
bool called = false;
|
||||
string name = "Another test object";
|
||||
Derived obj = new Derived(null, (test.Testing a) => {
|
||||
Derived obj = new Derived(null, (test.ITesting a) => {
|
||||
called = true;
|
||||
a.SetComment(name);
|
||||
});
|
||||
|
@ -152,41 +152,41 @@ class TestEoParent
|
|||
{
|
||||
public static void basic_parent()
|
||||
{
|
||||
test.Testing parent = new test.TestingConcrete(null);
|
||||
test.Testing child = new test.TestingConcrete(parent);
|
||||
test.ITesting parent = new test.Testing(null);
|
||||
test.ITesting child = new test.Testing(parent);
|
||||
|
||||
Test.AssertEquals(parent, child.GetParent());
|
||||
|
||||
test.Testing parent_retrieved = test.TestingConcrete.static_cast(child.GetParent());
|
||||
test.ITesting parent_retrieved = test.Testing.static_cast(child.GetParent());
|
||||
Test.AssertEquals(parent, parent_retrieved);
|
||||
}
|
||||
|
||||
public static void parent_inherited_class()
|
||||
{
|
||||
test.Numberwrapper parent = new test.NumberwrapperConcrete(null);
|
||||
test.Testing child = new test.TestingConcrete(parent);
|
||||
test.INumberwrapper parent = new test.Numberwrapper(null);
|
||||
test.ITesting child = new test.Testing(parent);
|
||||
|
||||
Test.AssertEquals(parent, child.GetParent());
|
||||
|
||||
test.Numberwrapper parent_retrieved = test.NumberwrapperConcrete.static_cast(child.GetParent());
|
||||
test.INumberwrapper parent_retrieved = test.Numberwrapper.static_cast(child.GetParent());
|
||||
Test.AssertEquals(parent, parent_retrieved);
|
||||
}
|
||||
|
||||
private class Derived : test.TestingInherit
|
||||
{
|
||||
public Derived(test.Testing parent = null) : base (parent)
|
||||
public Derived(test.ITesting parent = null) : base (parent)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static void basic_parent_managed_inherit()
|
||||
{
|
||||
test.Testing parent = new Derived(null);
|
||||
test.Testing child = new Derived(parent);
|
||||
test.ITesting parent = new Derived(null);
|
||||
test.ITesting child = new Derived(parent);
|
||||
|
||||
Test.AssertEquals(parent, child.GetParent());
|
||||
|
||||
test.Testing parent_from_cast = test.TestingConcrete.static_cast(child.GetParent());
|
||||
test.ITesting parent_from_cast = test.Testing.static_cast(child.GetParent());
|
||||
Test.AssertEquals(parent, parent_from_cast);
|
||||
}
|
||||
}
|
||||
|
@ -196,15 +196,15 @@ class TestKlassMethods
|
|||
public static void basic_class_method()
|
||||
{
|
||||
int reference = 0xbeef;
|
||||
test.TestingConcrete.SetKlassProp(reference);
|
||||
Test.AssertEquals(reference, test.TestingConcrete.GetKlassProp());
|
||||
test.Testing.SetKlassProp(reference);
|
||||
Test.AssertEquals(reference, test.Testing.GetKlassProp());
|
||||
}
|
||||
|
||||
public static void inherited_class_method()
|
||||
{
|
||||
int reference = 0xdead;
|
||||
test.ChildConcrete.SetKlassProp(reference);
|
||||
Test.AssertEquals(reference, test.ChildConcrete.GetKlassProp());
|
||||
test.Child.SetKlassProp(reference);
|
||||
Test.AssertEquals(reference, test.Child.GetKlassProp());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class TestEolianError
|
|||
|
||||
public static void global_eina_error()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
Test.AssertRaises<efl.EflException>(() => obj.RaisesEinaError());
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class TestEolianError
|
|||
|
||||
public static void global_eina_error_inherited()
|
||||
{
|
||||
test.Testing obj = new Child();
|
||||
test.ITesting obj = new Child();
|
||||
Test.AssertRaises<efl.EflException>(() => obj.RaisesEinaError());
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ class TestEolianError
|
|||
|
||||
public static void exception_raised_from_inherited_virtual()
|
||||
{
|
||||
test.Testing obj = new Overrider();
|
||||
test.ITesting obj = new Overrider();
|
||||
|
||||
Test.AssertRaises<efl.EflException>(obj.CallChildrenRaiseError);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class TestEolianError
|
|||
// return eina_error
|
||||
public static void eina_error_return()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
eina.Error expected = 42;
|
||||
obj.SetErrorRet(expected);
|
||||
eina.Error error = obj.ReturnsError();
|
||||
|
@ -79,7 +79,7 @@ class TestEolianError
|
|||
|
||||
public static void eina_error_return_from_inherited_virtual()
|
||||
{
|
||||
test.Testing obj = new ReturnOverride();
|
||||
test.ITesting obj = new ReturnOverride();
|
||||
eina.Error expected = 42;
|
||||
obj.SetErrorRet(expected);
|
||||
eina.Error error = obj.ReturnsError();
|
||||
|
@ -108,7 +108,7 @@ class TestEolianError
|
|||
// An event whose managed delegate generates an exception
|
||||
// must set an eina_error so it can be reported back to
|
||||
// the managed code
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.ILoop loop = new efl.Loop();
|
||||
Listener listener = new Listener();
|
||||
loop.CallbackAddEvt += listener.callback;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
|
||||
using static test.TestingConcrete; // For the event args
|
||||
using static test.Testing; // For the event args
|
||||
|
||||
namespace TestSuite
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ class TestEoEvents
|
|||
public bool correct_sender = false;
|
||||
protected void callback(object sender, EventArgs e) {
|
||||
called = true;
|
||||
efl.Object obj = sender as efl.Object;
|
||||
efl.IObject obj = sender as efl.IObject;
|
||||
if (obj != null)
|
||||
{
|
||||
obj.SetName("loop_called");
|
||||
|
@ -22,7 +22,7 @@ class TestEoEvents
|
|||
|
||||
public static void callback_add_event()
|
||||
{
|
||||
efl.Loop loop = new efl.LoopConcrete();
|
||||
efl.ILoop loop = new efl.Loop();
|
||||
loop.SetName("loop");
|
||||
TestEoEvents listener = new TestEoEvents();
|
||||
loop.CallbackAddEvt += listener.callback;
|
||||
|
@ -38,7 +38,7 @@ class TestEoEvents
|
|||
|
||||
public static void event_with_string_payload()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
string received_string = null;
|
||||
|
||||
obj.EvtWithStringEvt += (object sender, EvtWithStringEvt_Args e) => {
|
||||
|
@ -52,7 +52,7 @@ class TestEoEvents
|
|||
|
||||
public static void event_with_int_payload()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
int received_int= 0;
|
||||
|
||||
obj.EvtWithIntEvt += (object sender, EvtWithIntEvt_Args e) => {
|
||||
|
@ -66,7 +66,7 @@ class TestEoEvents
|
|||
|
||||
public static void event_with_bool_payload()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
bool received_bool = false;
|
||||
|
||||
obj.EvtWithBoolEvt += (object sender, EvtWithBoolEvt_Args e) => {
|
||||
|
@ -84,7 +84,7 @@ class TestEoEvents
|
|||
|
||||
public static void event_with_uint_payload()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
uint received_uint = 0;
|
||||
obj.EvtWithUintEvt += (object sender, EvtWithUintEvt_Args e) => {
|
||||
received_uint = e.arg;
|
||||
|
@ -97,14 +97,14 @@ class TestEoEvents
|
|||
|
||||
public static void event_with_object_payload()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.Testing received_obj = null;
|
||||
test.ITesting obj = new test.Testing();
|
||||
test.ITesting received_obj = null;
|
||||
|
||||
obj.EvtWithObjEvt += (object sender, EvtWithObjEvt_Args e) => {
|
||||
received_obj = e.arg;
|
||||
};
|
||||
|
||||
test.Testing sent_obj = new test.TestingConcrete();
|
||||
test.ITesting sent_obj = new test.Testing();
|
||||
|
||||
obj.EmitEventWithObj(sent_obj);
|
||||
|
||||
|
@ -113,7 +113,7 @@ class TestEoEvents
|
|||
|
||||
public static void event_with_error_payload()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
eina.Error received_error = 0;
|
||||
|
||||
obj.EvtWithErrorEvt += (object sender, EvtWithErrorEvt_Args e) => {
|
||||
|
@ -129,7 +129,7 @@ class TestEoEvents
|
|||
|
||||
public static void event_with_struct_payload()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
test.StructSimple received_struct = default(test.StructSimple);
|
||||
|
||||
obj.EvtWithStructEvt += (object sender, EvtWithStructEvt_Args e) => {
|
||||
|
|
|
@ -9,7 +9,7 @@ class TestFunctionPointerMarshalling
|
|||
{
|
||||
public static void func_pointer_marshalling()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
bool called = false;
|
||||
eina.Strbuf buf = new eina.Strbuf();
|
||||
string argument = "Some String";
|
||||
|
|
|
@ -29,7 +29,7 @@ class TestFunctionPointers
|
|||
public static void set_callback_basic()
|
||||
{
|
||||
setup();
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.SetCallback(twice);
|
||||
|
||||
Test.Assert(called == false, "set_callback should not call the callback");
|
||||
|
@ -44,7 +44,7 @@ class TestFunctionPointers
|
|||
{
|
||||
setup();
|
||||
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.SetCallback(y => {
|
||||
called = true;
|
||||
return y + 4;
|
||||
|
@ -62,7 +62,7 @@ class TestFunctionPointers
|
|||
{
|
||||
setup();
|
||||
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.SetCallback(twice);
|
||||
Test.Assert(called == false, "set_callback should not call the callback");
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public static class TestParts
|
|||
{
|
||||
public static void basic_part_test()
|
||||
{
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
do_part_test(t);
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ public static class TestParts
|
|||
do_part_test(t);
|
||||
}
|
||||
|
||||
private static void do_part_test(test.Testing t)
|
||||
private static void do_part_test(test.ITesting t)
|
||||
{
|
||||
var p1 = t.Part1;
|
||||
var p2 = t.Part2;
|
||||
|
|
|
@ -18,7 +18,7 @@ class TestStrBuf
|
|||
|
||||
public static void test_eolian()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
eina.Strbuf buf = new eina.Strbuf();
|
||||
|
||||
obj.AppendToStrbuf(buf, "Appended");
|
||||
|
|
|
@ -8,7 +8,7 @@ class TestStrings
|
|||
public static void in_string()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
String sent = "in_string";
|
||||
String returned = obj.InString(sent);
|
||||
Test.AssertEquals(sent, returned);
|
||||
|
@ -21,7 +21,7 @@ class TestStrings
|
|||
public static void in_own_string()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
String sent = "in_own_string";
|
||||
String returned = obj.InOwnString(sent);
|
||||
Test.AssertEquals(sent, returned);
|
||||
|
@ -33,7 +33,7 @@ class TestStrings
|
|||
public static void return_string()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
Test.AssertEquals("string", obj.ReturnString());
|
||||
}
|
||||
System.GC.Collect();
|
||||
|
@ -43,7 +43,7 @@ class TestStrings
|
|||
public static void return_own_string()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
Test.AssertEquals("own_string", obj.ReturnOwnString());
|
||||
}
|
||||
System.GC.Collect();
|
||||
|
@ -54,7 +54,7 @@ class TestStrings
|
|||
{
|
||||
{
|
||||
String str = String.Empty;
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.OutString(out str);
|
||||
Test.AssertEquals("out_string", str);
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class TestStrings
|
|||
{
|
||||
{
|
||||
String str = String.Empty;
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.OutOwnString(out str);
|
||||
Test.AssertEquals(str.ToString(), "out_own_string");
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ class TestStrings
|
|||
* some time in the future */
|
||||
public static void return_string_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringReturner();
|
||||
test.ITesting obj = new StringReturner();
|
||||
/* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
|
||||
Test.AssertEquals("inherited", obj.CallReturnString());
|
||||
System.GC.Collect();
|
||||
|
@ -153,7 +153,7 @@ class TestStrings
|
|||
/* The managed wrapper must surrender the ownership to the C after the virtual call. */
|
||||
public static void return_own_string_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringReturner();
|
||||
test.ITesting obj = new StringReturner();
|
||||
/* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
|
||||
Test.AssertEquals("own_inherited", obj.CallReturnOwnString());
|
||||
System.GC.Collect();
|
||||
|
@ -163,7 +163,7 @@ class TestStrings
|
|||
* need to cache it until some time in the future. */
|
||||
public static void out_string_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringReturner();
|
||||
test.ITesting obj = new StringReturner();
|
||||
/* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
|
||||
Test.AssertEquals("out_inherited", obj.CallOutString());
|
||||
System.GC.Collect();
|
||||
|
@ -172,7 +172,7 @@ class TestStrings
|
|||
/* The managed wrapper gives C the ownership of the filled out parameter */
|
||||
public static void out_own_string_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringReturner();
|
||||
test.ITesting obj = new StringReturner();
|
||||
/* for (int i = 0; i < 10000; i ++) // Uncomment this to check for memory leaks. */
|
||||
Test.AssertEquals("out_own_inherited", obj.CallOutOwnString());
|
||||
System.GC.Collect();
|
||||
|
@ -185,7 +185,7 @@ class TestStringshare
|
|||
public static void in_stringshare()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
String sent = "in_stringshare";
|
||||
String returned = obj.InStringshare(sent);
|
||||
Test.AssertEquals(sent, returned);
|
||||
|
@ -196,7 +196,7 @@ class TestStringshare
|
|||
public static void in_own_stringshare()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
String sent = "in_own_stringshare";
|
||||
String returned = obj.InOwnStringshare(sent);
|
||||
Test.AssertEquals(sent, returned);
|
||||
|
@ -207,7 +207,7 @@ class TestStringshare
|
|||
public static void return_stringshare()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
Test.AssertEquals("stringshare", obj.ReturnStringshare());
|
||||
}
|
||||
System.GC.Collect();
|
||||
|
@ -216,7 +216,7 @@ class TestStringshare
|
|||
public static void return_own_stringshare()
|
||||
{
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
Test.AssertEquals("own_stringshare", obj.ReturnOwnStringshare());
|
||||
}
|
||||
System.GC.Collect();
|
||||
|
@ -226,7 +226,7 @@ class TestStringshare
|
|||
{
|
||||
{
|
||||
String str = String.Empty;
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.OutStringshare(out str);
|
||||
Test.AssertEquals("out_stringshare", str);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ class TestStringshare
|
|||
{
|
||||
{
|
||||
String str = String.Empty;
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
obj.OutOwnStringshare(out str);
|
||||
Test.AssertEquals(str.ToString(), "out_own_stringshare");
|
||||
}
|
||||
|
@ -304,28 +304,28 @@ class TestStringshare
|
|||
|
||||
public static void return_stringshare_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringshareReturner();
|
||||
test.ITesting obj = new StringshareReturner();
|
||||
// for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
|
||||
Test.AssertEquals("inherited", obj.CallReturnStringshare());
|
||||
}
|
||||
|
||||
public static void return_own_stringshare_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringshareReturner();
|
||||
test.ITesting obj = new StringshareReturner();
|
||||
// for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
|
||||
Test.AssertEquals("own_inherited", obj.CallReturnOwnStringshare());
|
||||
}
|
||||
|
||||
public static void out_stringshare_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringshareReturner();
|
||||
test.ITesting obj = new StringshareReturner();
|
||||
// for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
|
||||
Test.AssertEquals("out_inherited", obj.CallOutStringshare());
|
||||
}
|
||||
|
||||
public static void out_own_stringshare_from_virtual()
|
||||
{
|
||||
test.Testing obj = new StringshareReturner();
|
||||
test.ITesting obj = new StringshareReturner();
|
||||
// for (int i = 0; i < 1000000; i ++) // Uncomment this to check for memory leaks.
|
||||
Test.AssertEquals("out_own_inherited", obj.CallOutOwnStringshare());
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ class TestStructs
|
|||
complex.Fslice.Mem = eina.MemoryNative.Alloc(1);
|
||||
Marshal.WriteByte(complex.Fslice.Mem, 125);
|
||||
|
||||
complex.Fobj = new test.NumberwrapperConcrete();
|
||||
complex.Fobj = new test.Numberwrapper();
|
||||
complex.Fobj.SetNumber(42);
|
||||
|
||||
return complex;
|
||||
|
@ -261,7 +261,7 @@ class TestStructs
|
|||
public static void simple_in()
|
||||
{
|
||||
var simple = structSimpleWithValues();
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
bool r = t.StructSimpleIn(simple);
|
||||
Test.Assert(r, "Function returned false");
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ class TestStructs
|
|||
var simple = structSimpleWithValues();
|
||||
int original = simple.Fint;
|
||||
simple.Fmstring = "Struct Ptr In";
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
Test.Assert(t.StructSimplePtrIn(ref simple));
|
||||
Test.AssertEquals(-original, simple.Fint);
|
||||
Test.AssertEquals("nI rtP tcurtS", simple.Fmstring);
|
||||
|
@ -282,7 +282,7 @@ class TestStructs
|
|||
var simple = structSimpleWithValues();
|
||||
int original = simple.Fint;
|
||||
simple.Fmstring = "Struct Ptr In Own";
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
test.StructSimple result = t.StructSimplePtrInOwn(ref simple);
|
||||
Test.AssertEquals(-original, result.Fint);
|
||||
Test.AssertEquals("nwO nI rtP tcurtS", result.Fmstring);
|
||||
|
@ -291,7 +291,7 @@ class TestStructs
|
|||
public static void simple_out()
|
||||
{
|
||||
var simple = new test.StructSimple();
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
bool r = t.StructSimpleOut(out simple);
|
||||
Test.Assert(r, "Function returned false");
|
||||
checkStructSimple(simple);
|
||||
|
@ -300,7 +300,7 @@ class TestStructs
|
|||
public static void simple_ptr_out()
|
||||
{
|
||||
test.StructSimple simple;
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
test.StructSimple result = t.StructSimplePtrOut(out simple);
|
||||
Test.AssertEquals(result.Fint, simple.Fint);
|
||||
Test.AssertEquals(result.Fstring, simple.Fstring);
|
||||
|
@ -309,7 +309,7 @@ class TestStructs
|
|||
public static void simple_ptr_out_own()
|
||||
{
|
||||
test.StructSimple simple;
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
test.StructSimple result = t.StructSimplePtrOutOwn(out simple);
|
||||
Test.AssertEquals(result.Fint, simple.Fint);
|
||||
Test.AssertEquals(simple.Fstring, "Ptr Out Own");
|
||||
|
@ -317,21 +317,21 @@ class TestStructs
|
|||
|
||||
public static void simple_return()
|
||||
{
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
var simple = t.StructSimpleReturn();
|
||||
checkStructSimple(simple);
|
||||
}
|
||||
|
||||
public static void simple_ptr_return()
|
||||
{
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
var simple = t.StructSimplePtrReturn();
|
||||
Test.AssertEquals(simple.Fstring, "Ret Ptr");
|
||||
}
|
||||
|
||||
public static void simple_ptr_return_own()
|
||||
{
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
var simple = t.StructSimplePtrReturnOwn();
|
||||
Test.AssertEquals(simple.Fstring, "Ret Ptr Own");
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ class TestStructs
|
|||
public static void complex_in()
|
||||
{
|
||||
var complex = structComplexWithValues();
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
bool r = t.StructComplexIn(complex);
|
||||
Test.Assert(r, "Function returned false");
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ class TestStructs
|
|||
public static void complex_out()
|
||||
{
|
||||
var complex = new test.StructComplex();
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
bool r = t.StructComplexOut(out complex);
|
||||
Test.Assert(r, "Function returned false");
|
||||
checkStructComplex(complex);
|
||||
|
@ -537,7 +537,7 @@ class TestStructs
|
|||
|
||||
public static void complex_return()
|
||||
{
|
||||
test.Testing t = new test.TestingConcrete();
|
||||
test.ITesting t = new test.Testing();
|
||||
var complex = t.StructComplexReturn();
|
||||
checkStructComplex(complex);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace TestSuite {
|
|||
public static class TestEinaValueEolian {
|
||||
public static void TestEolianEinaValueInReturn()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
|
||||
using (eina.Value v = new eina.Value(eina.ValueType.Int32)) {
|
||||
v.Set(42);
|
||||
|
@ -27,7 +27,7 @@ public static class TestEinaValueEolian {
|
|||
|
||||
public static void TestEolianEinaValueInOwn()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
|
||||
using (eina.Value v = new eina.Value(eina.ValueType.Int32)) {
|
||||
v.Set(2001);
|
||||
|
@ -47,7 +47,7 @@ public static class TestEinaValueEolian {
|
|||
|
||||
public static void TestEolianEinaValueOut()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
|
||||
using (eina.Value v = new eina.Value(eina.ValueType.String)) {
|
||||
eina.Value v_out = null;
|
||||
|
@ -63,7 +63,7 @@ public static class TestEinaValueEolian {
|
|||
|
||||
public static void TestEolianEinaValueOutOwn()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
|
||||
using (eina.Value v = new eina.Value(eina.ValueType.String)) {
|
||||
eina.Value v_out = null;
|
||||
|
@ -79,7 +79,7 @@ public static class TestEinaValueEolian {
|
|||
|
||||
public static void TestEolianEinaValueInReturnByValue()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
|
||||
using (eina.Value v = new eina.Value(eina.ValueType.Int32)) {
|
||||
v.Set(42);
|
||||
|
@ -96,7 +96,7 @@ public static class TestEinaValueEolian {
|
|||
|
||||
public static void TestEolianEinaValueOutByValue()
|
||||
{
|
||||
test.Testing obj = new test.TestingConcrete();
|
||||
test.ITesting obj = new test.Testing();
|
||||
|
||||
using (eina.Value v = new eina.Value(eina.ValueType.String)) {
|
||||
eina.Value v_out = null;
|
||||
|
|
Loading…
Reference in New Issue