summaryrefslogtreecommitdiff
path: root/test cases/failing/12 string arithmetic
AgeCommit message (Collapse)Author
2023-04-04propagate the most accurate node to error messagesEli Schwartz
During evaluation of codeblocks, we start off with an iteration of nodes, and then while evaluating them we may update the global self.current_node context. When catching and formatting errors, we didn't take into account that the node might be updated from the original top-level iteration. Switch to formatting errors using self.current_node instead, to ensure we can point at the likely most-accurate actual cause of an error. Also update the current node in a few more places, so that function calls always see the function call as the current node, even if the most recently parsed node was an argument to the function call. Fixes #11643
2022-08-23tests: remove compiler requirement in various unneeded casesEli Schwartz
Compiled languages are Meson's bread and butter, but hardly required. This is convenient, because many test caases specifically, do not care about testing the compiler interactions. In such cases, we can skip doing compiler lookups which aren't used, as they only slow down test setup.
2021-10-06interpreter: Holderify arrays and dictsDaniel Mensinger
This is the final refactoring for extracting the bultin object logic out of Interpreterbase. I decided to do both arrays and dicts in one go since splitting it would have been a lot more confusing.
2021-09-25interpreter: Introduce StringHolderDaniel Mensinger
Another commit in my quest to rid InterpreterBase from all higher level object processing logic. Additionally, there is a a logic change here, since `str.join` now uses varargs and can now accept more than one argument (and supports list flattening).
2020-04-30Add expected stdout for failing-meson and warning-meson testsJon Turney
Initially produced using: for d in "test cases/failing/"* ; do rm -r _build ; ./meson.py setup "$d" _build | grep ERROR >"$d"/expected_stdout.txt; done then converted to json with jq using: jq --raw-input --slurp 'split("\n") | {stdout: map({line: select(. != "")})}' expected_stdout.txt >test.json or merged with existing json using: jq --slurp '.[0] + .[1]' test.json expected.json >test.json.new v2: Add some comments to explain the match when it isn't totally obvious v3: Add or adjust existing re: in expected output to handle '/' or '\' path separators appearing in message, not location. v4: Put expected stdout in test.json, rather than a separate expected_stdout.txt file Park comments in an unused 'comments' key, as JSON doesn't have a syntax for comments
2014-11-16More strict type checking for arithmetic operations.Jussi Pakkanen
2014-11-16Add number, string and array arithmeticRobin McCorkell
Addition (+), subtraction (-), multiplication (*) and division (/) for numbers follows the BIDMAS rules. Strings and arrays can be concatenated with the addition operator Strings can be concatenated with numbers with the addition operator