| Index: test/intl/date-format/parse-mdyhms.js
|
| diff --git a/src/a64/debugger-a64.h b/test/intl/date-format/parse-mdyhms.js
|
| similarity index 64%
|
| copy from src/a64/debugger-a64.h
|
| copy to test/intl/date-format/parse-mdyhms.js
|
| index 50480cc268a49f53fafc1650e79d73de573524ed..74f7467f3dabac6ab99cb8e22dfe3352b7b82e69 100644
|
| --- a/src/a64/debugger-a64.h
|
| +++ b/test/intl/date-format/parse-mdyhms.js
|
| @@ -25,32 +25,27 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#ifndef V8_A64_DEBUGGER_A64_H_
|
| -#define V8_A64_DEBUGGER_A64_H_
|
| +// Testing v8Parse method for date and time pattern.
|
|
|
| -#if defined(USE_SIMULATOR)
|
| +var dtf = new Intl.DateTimeFormat(['en'],
|
| + {year: 'numeric', month: 'numeric',
|
| + day: 'numeric', hour: 'numeric',
|
| + minute: 'numeric', second: 'numeric'});
|
|
|
| -#include "globals.h"
|
| -#include "utils.h"
|
| -#include "a64/constants-a64.h"
|
| -#include "a64/simulator-a64.h"
|
| +// Make sure we have pattern we expect (may change in the future).
|
| +assertEquals('M/d/y h:mm:ss a', dtf.resolved.pattern);
|
|
|
| -namespace v8 {
|
| -namespace internal {
|
| +assertEquals('Sat May 04 1974 12:30:12 GMT-0007 (PDT)',
|
| + usePDT(String(dtf.v8Parse('5/4/74 12:30:12 pm'))));
|
|
|
| +// AM/PM were not specified.
|
| +assertEquals(undefined, dtf.v8Parse('5/4/74 12:30:12'));
|
|
|
| -class Debugger : public Simulator {
|
| - public:
|
| - Debugger(Decoder* decoder, FILE* stream = stdout)
|
| - : Simulator(decoder, NULL, stream) {}
|
| +// Time was not specified.
|
| +assertEquals(undefined, dtf.v8Parse('5/4/74'));
|
|
|
| - // Functions overloading.
|
| - void VisitException(Instruction* instr);
|
| -};
|
| +// Month is numeric, so it fails on "May".
|
| +assertEquals(undefined, dtf.v8Parse('May 4th 1974'));
|
|
|
| -
|
| -} } // namespace v8::internal
|
| -
|
| -#endif // USE_SIMULATOR
|
| -
|
| -#endif // V8_A64_DEBUGGER_A64_H_
|
| +// Wrong date delimiter.
|
| +assertEquals(undefined, dtf.v8Parse('5-4-74 12:30:12 am'));
|
|
|