[PATCH] D95924: [Example][NFC} Add testcase for BrainF HelloWorld

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 01:35:46 PST 2021


t.p.northover added a comment.

> I doubt it. because when I run test files separately they are passing. The issue occurs when I merge them in a single file.

That adds more perturbations to the initial tape state which is enough to break the "Hello World" output.

> Could you please suggest RUN line by example, I tried some configurations, It doesn't work on my system.

This worked for me:

  [
  ; RUN: BrainF %s -o - | llvm-dis | FileCheck --check-prefix=CHECK %s
  ; RUN: BrainF %s -o - | lli 2>&1 | FileCheck --check-prefix=EXEC %s
  ]

Though it seems there's extra output from the CHECK lines too. It might actually be better to put the BF code in its own completely separate file (this is usually put in an `Inputs` subdirectory and referred to as `%p/Inputs/helloworld.bf` instead of the test name `%s`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95924/new/

https://reviews.llvm.org/D95924



More information about the llvm-commits mailing list