How to write a test Case for BrainF LLVM

Hi,
I am new to the LLVM community, and i am trying to write a test case for the BrainF example, but i cant even figure out where to start from

I would appreciate if i can get heads start, I understand the BrainF language fully well, but i dont understand how to write a testcase for it, i tried to follow the simplify CFG example, but that did not work

Hello Jennifer,

If you don’t understand something don’t worry, learning takes time for everyone.

LLVM test cases are written in FileCheck format.
The first thing you can do is to go through FileCheck documentation especially the tutorial section.
You will understand what are these RUN, CHECK-LABEL, CHECK-NEXT lines in SimplifyCFG/tut-simplify-cfg1.ll test case.

https://llvm.org/docs/CommandGuide/FileCheck.html

It is also necessary that you understand LLVM IR.

One video tutorial - 2019 EuroLLVM Developers’ Meeting: V. Bridgers & F. Piovezan “LLVM IR Tutorial - Phis, GEPs ...” - YouTube

Another good tutorial for reading
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/README.html

For the simplest test, you can go through Using LLVM LIT Out-Of-Tree. Lit is an end-to-end testing… | by Min-Yih Hsu | Medium.
Try by just copy-pasting.

If you patiently go through these links, you may ask some specific questions next time.

Good luck!