Espruino/tests/test_new_string_from_constructor.js
Michael Duerinckx 7f5308590b Rename numbered tests to something more descriptive - closes #16
test077 is the only one I really couldn't figure out what it was meant
to test.
2014-03-01 22:15:28 +00:00

9 lines
229 B
JavaScript

// New string from constructor
var a = new String();
var b = new String("Hello World");
var c = new String("ABC");
String.prototype.count = function() { return this.length; }
result = a=="" && b=="Hello World" && c.count()==3;