Skip to content

Commit

Permalink
[tests] add test
Browse files Browse the repository at this point in the history
see #9585
  • Loading branch information
Simn committed Jun 15, 2020
1 parent 3aafbdc commit 9c4c6c3
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/unit/src/unit/issues/Issue9585.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package unit.issues;

using StringTools;

function getFloat():Dynamic {
return 12.34;
}

function getInt():Dynamic {
return 666;
}

function getBool():Dynamic {
return false;
}

function getArray():Dynamic {
return [1, 2, 3];
}

function getObject():Dynamic {
return {x: 0};
}

class Issue9585 extends Test {
function test() {
var value1 /* :Dynamic */ = getFloat();
var value2 /* :Dynamic */ = getInt();
var value3 /* :Dynamic */ = getBool();
var value4 /* :Dynamic */ = getArray();
var value5 /* :Dynamic */ = getObject();

var s:String = "Results: " + value1 + ", " + value2 + ", " + value3 + ", " + value4 + ", " + value5;
t(s.startsWith("Results: 12.34, 666, false, [1,2,3]"));
}
}

0 comments on commit 9c4c6c3

Please sign in to comment.