Allow strings to be passed in function test.

Fixes #5701. For Waypoint: Passing Values to Functions with Arguments.
Changes the last test to allow strings to be passed as arguments in myFunction.
pull/5713/head
Brandon Eichler 2016-01-01 11:47:04 -06:00
parent 057b5eacd7
commit db2245857f
1 changed files with 1 additions and 1 deletions

View File

@ -1899,7 +1899,7 @@
"assert(typeof myFunction === 'function', 'message: <code>myFunction</code> should be a function');",
"if(typeof myFunction === \"function\") { capture(); myFunction(1,2); uncapture(); } assert(logOutput == 3, 'message: <code>myFunction(1,2)</code> should output <code>3</code>');",
"if(typeof myFunction === \"function\") { capture(); myFunction(7,9); uncapture(); } assert(logOutput == 16, 'message: <code>myFunction(7,9)</code> should output <code>16</code>');",
"assert(/^\\s*myFunction\\(\\s*\\d+\\s*,\\s*\\d+\\s*\\)\\s*;/m.test(code), 'message: Call <code>myFunction</code> after you define it');"
"assert(/^\\s*myFunction\\s*\\([\\w\\W]+\\)\\s*;/m.test(code), 'message: Call <code>myFunction</code> after you define it.');"
],
"type": "waypoint",
"challengeType": "1",