summaryrefslogtreecommitdiff
path: root/test/buildtool/build_engine/expression/expression.test.cpp
AgeCommit message (Collapse)Author
2025-03-24Test 'zip_map' expressionPaul Cristian Sarbu
2025-03-24Test 'zip_with' expressionPaul Cristian Sarbu
2024-12-19Fix cause of minor warningsOliver Reiche
2024-12-19Fix struct member initializationOliver Reiche
2024-11-14tests: Implement IWYU suggestionsMaksim Denisov
2024-10-23expressions: enforce strict arguments for "join" and "join_cmd"v1.4.0-alpha+20241023Klaus Aehlig
... as described in the documentation. It was never intended to have a single string being an argument for those.
2024-08-27Reformat code to comply with clang-format 18Klaus Aehlig
... while keeping our .clang-format file.
2024-08-14expression language: add nub_leftKlaus Aehlig
Originally, the expression lanuage only contained a function to deduplicate a list, keeping only the right-most occurence. The reason was that this is the order needed for linking: a library providing an open symbol has to come on the command line after the library using that symbol (and hence making it an open symbol). However, by now use cases have emerged that require a topological sorting where definition comes before use; also, when composing the value of PATH from fragments, we usually want to keep the first occurrence in order for it to take precedence. Therefore, also add "nub_left" as built-in function, allowing a more condense (and slightly more efficient) description in rules instead of the revserse-nub_right-reverse pattern.
2024-08-05Expression language: add expression from_subdirKlaus Aehlig
... allowing to select only the keys in a specific subdir, and move the them to top-level.
2024-08-05expression test: use built-in quotingKlaus Aehlig
... instead of having a custom quoting function in the tests.
2024-07-26Add quasiquote expressionKlaus Aehlig
2024-07-26expression language: add quotingKlaus Aehlig
2024-07-12Use static Create functions to construct ArtifactDescriptionMaksim Denisov
...instead of unobvious ctors relying on overload resolution.
2024-04-24expressions: add logical negationKlaus Aehlig
While this can already be expressed by an "if" statement, having a dedicated function for logical negation makes some expressions more readable.
2024-04-24expressions: for "if" expressions, make both branches optionalKlaus Aehlig
... using, also for the "then" branch, the empty list as default. In this way, this statement not only more symmetric, but also allows shorter representations of some typical expressions.
2024-04-24expressions: add "length" functionKlaus Aehlig
Lists are somtimes used in configurations as replacement for tuples. Providing length gives an easy way to detect usage errors.
2024-04-24expressions: add generic assertionsKlaus Aehlig
2024-04-24expressions: add basic test for assertionsKlaus Aehlig
2024-04-16expression language: add array access by indexKlaus Aehlig
2024-04-08test: Add missing includes and fix depsPaul Cristian Sarbu
2024-03-26Expression language: add float operations "*" and "+"Klaus Aehlig
Numerical values are used at some places in justbuild: as value for timeout scaling, as well as by the "range" expression that is used, e.g., to define repreated test runs. Therefore, improve support for numerical values by adding basic operations.
2023-08-14expression: add new built in "reverse"Klaus Aehlig
While a foldl is enough to implement a reverse functionality, adding it as a built in allows doing so in linear time.
2023-08-14expression: add new built in "set"Klaus Aehlig
... to obtain from a list of strings a map with those entries as keys and true as value. In this way, repeated membership tests in lists can be implemented more efficiently.
2023-03-15catch2: bump to version 3.3.2Alberto Sartori
tests have been updated accordingly
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-10-05Test: Add tests for 'env' expressionOliver Reiche
2022-07-04Drop copy constructor for expressionsOliver Reiche
2022-05-31"enumerate" expression: add padding to 10 charactersKlaus Aehlig
2022-05-30Built-in expressions: add enumerateKlaus Aehlig
Add a function transforming a list into a map. In this way, artifacts collected positionally in a list can easily be realized as a stage used for input to an action or output of a target.
2022-05-09Built-in "to_subdir": interpret input keys as pathKlaus Aehlig
... and detect conflicts araising this way. Also normalize the paths after staging them to the specified subdir.
2022-04-20Remove unused "+" on expressionsKlaus Aehlig
To concatenate lists (the only ability the "+" operator had), use "++".
2022-04-07expression evaluation: clean up truth valuesKlaus Aehlig
For historic reasons, we considerd special strings as false values. Drop that behavior in favor of a clean LISP-like semantics: everything is true that is not empty.
2022-03-02expression language: add a range functionKlaus Aehlig
Given a number or number representation, return a list of that length consisting of representations of the lower numbers. In this way, repeated non-pure actions can be generated (e.g., repetitions of a test to detect flakyness).
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>