From 8097f1a6df17795f18a865c86bfe648e49d17a6d Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Mon, 14 Oct 2019 07:24:07 -0700 Subject: [PATCH] [sledge] Adjust tests to match harnesses Reviewed By: ngorogiannis Differential Revision: D17801945 fbshipit-source-id: 0f984e013 --- sledge/test/frontend/address_of_label.cpp | 6 ++++++ sledge/test/frontend/cond_alloca.cpp | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sledge/test/frontend/address_of_label.cpp b/sledge/test/frontend/address_of_label.cpp index f0045d54e..64ee08869 100644 --- a/sledge/test/frontend/address_of_label.cpp +++ b/sledge/test/frontend/address_of_label.cpp @@ -22,3 +22,9 @@ SWAPWORD: result = (result << 16) | (result >> 16); goto* codetable[*(opcodes++)]; } + +int main() { + char opcodes[10]; + + return fn(opcodes); +} diff --git a/sledge/test/frontend/cond_alloca.cpp b/sledge/test/frontend/cond_alloca.cpp index f07aff232..5a31bedc2 100644 --- a/sledge/test/frontend/cond_alloca.cpp +++ b/sledge/test/frontend/cond_alloca.cpp @@ -5,9 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -int main(int argc, const char* argv[]) { +int main() { + int n; int a = 0; - if (argc > 0) { + if (n > 0) { int b = 1; }; return 0;