Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 10 additions and 15 deletions.
  1. +4 −1 t/base/02opadd.t
  2. +0 −8 t/base/features.t
  3. +6 −6 winxedxx_builtin_test_more.cxx
View
5 t/base/02opadd.t
@@ -7,20 +7,23 @@ using extern Test.More plan, ok, nok, is, isnt;
function main [main] (var args)
{
- plan(9);
+ plan(12);
is(1 + 1, 2, "add int constants");
int i1 = 1;
int i2 = 2;
+ is(i1 + 6, 7, "add int const");
is(i1 + i2, 3, "add int");
string s1 = "He";
string s2 = "llo";
is(s1 + s2, "Hello", "add string");
is(s1 + i2, "He2", "add string int");
float f1 = 1.3;
float f2 = 2.4;
+ is(f1 + 0.2, 1.5, "add float const");
is(f1 + f2, 3.7, "add float");
is(i1 + f2, 3.4, "add int float");
+ is(f1 + i2, 3.3, "add float int");
var o1 = 1;
is(o1 + i2, 3, "add var int");
var o2 = 2;
View
8 t/base/features.t
@@ -316,14 +316,6 @@ function main [main] (args)
i = --vi1;
is(i, 42, "var predecrement with assignment");
- is(i + 2, 44, "int + int");
- is(i + vi1, 84, "int + var");
- is(vi1 + i, 84, "var + int");
-
- is(n + 0.1, 2.6, "float + float");
- is(n + i, 44.5, "float + int");
- is(i + n, 44.5, "int + float");
-
is(str + i, "2.542", "string + int");
is(i + str, "422.5", "int + string");
is(str + vi1, "2.542", "string + var");
View
12 winxedxx_builtin_test_more.cxx
@@ -70,7 +70,7 @@ WxxObjectPtr ok(const WxxObjectArray &args)
int numargs = args.elements();
int value = args.get_pmc_keyed(0).get_integer();
if (! value)
- std::cout << "n";
+ std::cout << "not ";
std::cout << "ok " << numNewTest();
if (numargs > 1)
std::cout << " - " << args.get_pmc_keyed(1).get_string();
@@ -84,7 +84,7 @@ WxxObjectPtr nok(const WxxObjectArray &args)
int numargs = args.elements();
int value = args.get_pmc_keyed(0).get_integer();
if (value)
- std::cout << "n";
+ std::cout << "not ";
std::cout << "ok " << numNewTest();
if (numargs > 1)
std::cout << " - " << args.get_pmc_keyed(1).get_string();
@@ -125,7 +125,7 @@ WxxObjectPtr is(const WxxObjectArray &args)
bool result = args_equal(value, expected);
if (! result)
- std::cout << "n";
+ std::cout << "not ";
std::cout << "ok " << numNewTest();
if (msg != "")
std::cout << " - " << msg;
@@ -147,7 +147,7 @@ WxxObjectPtr isnt(const WxxObjectArray &args)
bool result = args_equal(value, expected);
if (result)
- std::cout << "n";
+ std::cout << "not ";
std::cout << "ok " << numNewTest();
if (msg != "")
std::cout << " - " << msg;
@@ -169,7 +169,7 @@ WxxObjectPtr is_null(const WxxObjectArray &args)
bool result = value.is_null();
if (! result)
- std::cout << "n";
+ std::cout << "not ";
std::cout << "ok " << numNewTest();
if (msg != "")
std::cout << " - " << msg;
@@ -199,7 +199,7 @@ WxxObjectPtr throws_type(const WxxObjectArray &args)
}
if (! result)
- std::cout << "n";
+ std::cout << "not ";
std::cout << "ok " << numNewTest();
if (msg != "")
std::cout << " - " << msg;

No commit comments for this range

Something went wrong with that request. Please try again.