dextool 0.2.1

Suite of C/C++ tooling built on LLVM/Clang written in D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Overview

Dextool is a suite of tools for analyzing and code generation of C/C++ source code.

The current focus is generation of test doubles for C code.

Building and installing

To build dextool, run `build.sh`. You may have to set the environment variable LFLAGS.

Usage

Generate a simple C test double.

dextool ctestdouble functions.h

Analyze and generate a test double for function prototypes and extern variables. Both those found in functions.h and outside, aka via includes.

The test double is written to ./testdouble.hpp/.cpp. The name of the interface is TestDouble.

Generate a C test double excluding data from specified files.

dextool ctestdouble --file-exclude=/foo.h --file-exclude=functions.[h,c] --out=outdata/ functions.h -- -DBAR -I/some/path

The code analyzer (Clang) will be passed the compiler flags -DBAR and -I/some/path. During generation declarations found in foo.h or functions.h will be excluded.

The file holding the test double is written to directory outdata.

Credit

Jacob Carlborg for his excellent DStep. It was used as a huge inspiration for this code base. Without DStep deXTool wouldn't exist.

Authors:
  • Joakim Brännström
Dependencies:
dsrcgen, docopt, unit-threaded
Versions:
5.1.0 2024-Jun-05
5.0.0 2022-Dec-09
4.3.0 2022-Jun-03
4.2.0 2022-Mar-24
4.1.0 2022-Feb-08
Show all 51 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 2 downloads this month

  • 429 downloads total

Score:
2.3
Short URL:
dextool.dub.pm