(functionNameRoot)
| 101 | } |
| 102 | |
| 103 | function testDateFunctionWithValueRecoverTime(functionNameRoot) |
| 104 | { |
| 105 | var date = new Date(); |
| 106 | var setValue = date["get" + functionNameRoot](); |
| 107 | date.setMilliseconds(Number.NaN); |
| 108 | var setResult = date["set" + functionNameRoot](setValue); |
| 109 | if (setValue != setResult) { |
| 110 | testFailed("date(NaN).set" + functionNameRoot + "(" + setValue + ") was " + setResult + " instead of " + setValue); |
| 111 | return false; |
| 112 | } |
| 113 | var getResult = date["get" + functionNameRoot](); |
| 114 | if (getResult != setValue) { |
| 115 | testFailed("date.get" + functionNameRoot + "() was " + getResult + " instead of " + setValue); |
| 116 | return false; |
| 117 | } |
| 118 | testPassed ("recover from NaN date using date.set" + functionNameRoot + "()"); |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | function testDateFunctionWithValueRecoverFullYear(functionNameRoot) |
| 123 | { |
no test coverage detected