Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1287)

Unified Diff: test/intl/date-format/parse-mdyhms.js

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/intl/date-format/parse-mdy.js ('k') | test/intl/date-format/property-override.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'));
« no previous file with comments | « test/intl/date-format/parse-mdy.js ('k') | test/intl/date-format/property-override.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698