Skip to content

Structure

Lesley De Cruz edited this page Feb 14, 2016 · 3 revisions

Structure of the LuaJIT test suite

test

Test correctness/expected behaviour of LuaJIT.

  • libs: contains tests per library of the basic Lua libraries and the basic (core) functions (print(), pairs(), assert(), ...); reflects the structure of _G.
    • core
    • debug
    • string
    • table
    • ...
  • libs_ext: the libraries provided by LuaJIT, as well as the extensions to the core libraries (e.g. table.new()) and to the basic functions (e.g. xpcall() behaviour). ffi will be huge as it should basically test a C compiler; perhaps this should be split off in a separate directory.
    • core
    • bit
    • ffi
    • jit
    • table
    • ...
  • lang: language concepts such as scoping rules, closures, short circuit logic, varargs, order of assignments.
  • gc: garbage collector
  • parser
  • capi: all functions of the C API.
  • capi_ext: LuaJIT's extensions to the C API.
  • standalone: test the standalone LuaJIT interpreter's command line options.

jit

Tests for the JIT compiler (correctness + internals)

  • ir: tests for the the intermediate representation
  • opt: LuaJIT optimizations, such as ABC elimination, allocation sinking, etc. Should test correctness as well as check if the optimization actually occurs.
  • ...

bench

Performance and memory usage benchmarks.

Clone this wiki locally