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

Unified Diff: src/mips/test-interface-mips.cc

Issue 549079: Support for MIPS in architecture independent files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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
Index: src/mips/test-interface-mips.cc
===================================================================
--- src/mips/test-interface-mips.cc (revision 0)
+++ src/mips/test-interface-mips.cc (revision 0)
@@ -0,0 +1,47 @@
+#include <stdint.h>
antonm 2010/01/21 13:10:45 shouldn't those be moved into test dir?
Alexandre 2010/01/22 23:08:42 Yes they should. I'll remove it. On 2010/01/21 13:
+
+#include <v8.h>
+
+#include "test-interface-mips.h"
+
+using namespace v8;
+
+
+// Functions corresponding to different tests.
+int RunTest1();
+
+int main(int argc, char* argv[]) {
+
+ int32_t test = 1;
+
+ switch(test) {
+ case 1:
+ printf("case 1.\n");
+ return RunTest1();
+ default:
+ printf("No test to run.\n");
+ return -1;
+ };
+
+ return -1;
+}
+
+int RunTest1() {
+ // Create a stack-allocated handle scope.
+ HandleScope handle_scope;
+
+ // Create a new context.
+ Persistent<Context> context = Context::New();
+
+ // Enter the created context for compiling and
+ // running the hello world script.
+ Context::Scope context_scope(context);
+
+ // Call the test
+ TestMIPS1();
+
+ // Dispose the persistent context.
+ context.Dispose();
+
+ return 0;
+}

Powered by Google App Engine
This is Rietveld 408576698