[libcxx-commits] [PATCH] D113483: [libc++] Simplify selftest to avoid passing arguments to it

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 9 06:41:48 PST 2021


ldionne created this revision.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This makes the test pass on executors that don't support passing additional
arguments.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113483

Files:
  libcxx/test/libcxx/selftest/sh.cpp/substitutions.sh.cpp


Index: libcxx/test/libcxx/selftest/sh.cpp/substitutions.sh.cpp
===================================================================
--- libcxx/test/libcxx/selftest/sh.cpp/substitutions.sh.cpp
+++ libcxx/test/libcxx/selftest/sh.cpp/substitutions.sh.cpp
@@ -14,15 +14,11 @@
 // - %{exec}
 
 // RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe
-// RUN: %{exec} %t.exe "HELLO"
+// RUN: %{exec} %t.exe
 
 #include <cassert>
-#include <string>
 
-int main(int argc, char** argv) {
-  assert(argc == 2);
-
-  std::string arg = argv[1];
-  assert(arg == "HELLO");
+int main(int argc, char**) {
+  assert(argc == 1);
   return 0;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113483.385800.patch
Type: text/x-patch
Size: 639 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211109/fc048f61/attachment.bin>


More information about the libcxx-commits mailing list