Skip to content

Commit 938eec7

Browse files
committed
Add jinja test
1 parent f6d64ea commit 938eec7

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

tested/languages/cpp/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ def get_declaration_metadata(self) -> TypeDeclarationMetadata:
181181
"integer": "int",
182182
"real": "double",
183183
"char": "char",
184-
"text": "string",
185-
"string": "string",
184+
"text": "std::string",
185+
"string": "std::string",
186186
"boolean": "bool",
187187
"nothing": "void",
188188
"undefined": "void",

tests/descriptions/example.cpp.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Aan de functie `splits_in_woorden` moet een string (`std::string`) doorgegeven worden.
2+
De functie geeft een lijst van letters (`std::vector<char>`) terug.
3+
4+
```cpp
5+
a_function_call(std::string("yes"))
6+
```
7+
8+
This is cpp.

tests/descriptions/example.md.jinja2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ This is kotlin.
1313
This is java.
1414
{% elif programming_language == "haskell" %}
1515
This is haskell.
16+
{% elif programming_language == "cpp" %}
17+
This is cpp.
1618
{% endif %}
1719

tests/test_problem_statements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from tested.dsl.ast_translator import InvalidDslError
88

99

10-
@pytest.mark.parametrize("language", ["python", "kotlin", "java", "haskell"])
10+
@pytest.mark.parametrize("language", ["python", "kotlin", "java", "haskell", "cpp"])
1111
def test_small_descriptions(language: str):
1212
test_dir = Path(__file__).parent
1313
description_template = test_dir / "descriptions" / "example.md.jinja2"

0 commit comments

Comments
 (0)