Title: [208413] trunk/Source/_javascript_Core
- Revision
- 208413
- Author
- [email protected]
- Date
- 2016-11-04 19:48:16 -0700 (Fri, 04 Nov 2016)
Log Message
testWASM should be very sad if no options are provided
https://bugs.webkit.org/show_bug.cgi?id=164444
Reviewed by Saam Barati.
Detect missing or invalid options on the command line.
* testWasm.cpp:
(CommandLine::parseArguments):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (208412 => 208413)
--- trunk/Source/_javascript_Core/ChangeLog 2016-11-05 01:15:17 UTC (rev 208412)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-11-05 02:48:16 UTC (rev 208413)
@@ -1,3 +1,15 @@
+2016-11-04 JF Bastien <[email protected]>
+
+ testWASM should be very sad if no options are provided
+ https://bugs.webkit.org/show_bug.cgi?id=164444
+
+ Reviewed by Saam Barati.
+
+ Detect missing or invalid options on the command line.
+
+ * testWasm.cpp:
+ (CommandLine::parseArguments):
+
2016-11-04 Mark Lam <[email protected]>
Error description code should be able to handle Symbol values.
Modified: trunk/Source/_javascript_Core/testWasm.cpp (208412 => 208413)
--- trunk/Source/_javascript_Core/testWasm.cpp 2016-11-05 01:15:17 UTC (rev 208412)
+++ trunk/Source/_javascript_Core/testWasm.cpp 2016-11-05 02:48:16 UTC (rev 208413)
@@ -46,7 +46,6 @@
parseArguments(argc, argv);
}
- Vector<String> m_arguments;
bool m_runLEBTests { false };
bool m_runWasmTests { false };
@@ -68,21 +67,30 @@
{
int i = 1;
+ if (argc == i)
+ printUsageStatement(false);
+
for (; i < argc; ++i) {
const char* arg = argv[i];
- if (!strcmp(arg, "-h") || !strcmp(arg, "--help"))
+
+ if (!strcmp(arg, "-h") || !strcmp(arg, "--help")) {
printUsageStatement(true);
+ RELEASE_ASSERT_NOT_REACHED();
+ }
- if (!strcmp(arg, "-l") || !strcmp(arg, "--leb"))
+ if (!strcmp(arg, "-l") || !strcmp(arg, "--leb")) {
m_runLEBTests = true;
+ continue;
+ }
- if (!strcmp(arg, "-w") || !strcmp(arg, "--web"))
+ if (!strcmp(arg, "-w") || !strcmp(arg, "--web")) {
m_runWasmTests = true;
+ continue;
+ }
+
+ fprintf(stderr, "Unknown option %s\n", arg);
+ printUsageStatement(false);
}
-
- for (; i < argc; ++i)
- m_arguments.append(argv[i]);
-
}
StaticLock crashLock;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes