Skip to content

Commit ae62023

Browse files
authored
Merge pull request #510 from dodona-edu/add-cpp
Add cpp to tested docs
2 parents 61fc907 + bc60a4a commit ae62023

File tree

18 files changed

+93
-70
lines changed

18 files changed

+93
-70
lines changed

en/guides/exercises/testsuites/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To verify whether a submitted solution is correct, Dodona uses test suites.
99
This test suite contains a series of test cases that ensure you are reasonably certain whether a solution is correct or not.
1010

1111
In this guide, we briefly discuss the structure, followed by the various possibilities.
12-
Here we use TESTed: the recommended way to create exercises for **Python**, **JavaScript**, **Java**, **Kotlin**, **C**, **C#**, **Haskell**, and **Bash**.
12+
Here we use TESTed: the recommended way to create exercises for **Python**, **JavaScript**, **Typescript**, **Java**, **Kotlin**, **C**, **C#**, **C++**, **Haskell**, and **Bash**.
1313
If you want to do something that TESTed cannot do or you want to use a different programming language, first look at the [overview of all judges](/en/references/judges).
1414

1515
This guide contains more advanced concepts.
@@ -325,6 +325,7 @@ In the following example, a function is called with the sum of two numbers as an
325325
testcases:
326326
- expression:
327327
c: "to_string(1+1)"
328+
cpp: "to_string(1+1)"
328329
haskell: "Submission.toString (1+1)"
329330
runhaskell: "Submission.toString (1+1)"
330331
java: "Submission.toString(1+1)"

en/guides/general/getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Welcome to the Dodona guides.
1212
Dodona is an online exercise platform for learning to code.
1313
It wants to teach students how to program in the most meaningful and effective way possible. Dodona acts as an online co-teacher, designed to give every student access to high-quality education.
1414
The focus is on automatic corrections and giving meaningful feedback on the submitted solutions from students.
15-
At the moment, Dodona supports more than 20 programming languages, including Python, JavaScript, Java, Kotlin, C#, bash, Prolog, Haskell, sql and R.
15+
At the moment, Dodona supports more than 20 programming languages, including Python, JavaScript, Java, Kotlin, C#, C++, bash, Prolog, Haskell, sql and R.
1616

1717
Depending on your role, we have a specific guide for you:
1818

en/guides/students/getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ On this page, you will find all the information you need to get started with Dod
99

1010
## What is Dodona?
1111

12-
Dodona is an online exercise platform for learning to code. The web application was developed at Ghent University to support practical sessions for large groups of students. Dodona focuses primarily on the automatic testing and feedback for submitted solutions to programming exercises. Currently, Dodona supports more than 20 programming languages, including Python, JavaScript, Java, Kotlin, C#, bash, Prolog, Haskell, sql and R.
12+
Dodona is an online exercise platform for learning to code. The web application was developed at Ghent University to support practical sessions for large groups of students. Dodona focuses primarily on the automatic testing and feedback for submitted solutions to programming exercises. Currently, Dodona supports more than 20 programming languages, including Python, JavaScript, Java, Kotlin, C#, C++, bash, Prolog, Haskell, sql and R.
1313

1414
## Structure of the Guide
1515

en/guides/teachers/getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ All the information to get started smoothly with Dodona as a teacher.
1313
Dodona is an online exercise platform for learning to code.
1414
The web application was developed at Ghent University to support practical exercises for large groups of students.
1515
Dodona therefore primarily focuses on the automatic testing and feedback of submitted solutions to programming exercises.
16-
Currently, Dodona supports programming languages such as Python, JavaScript, Java, Kotlin, C#, bash, Prolog, Haskell, SQL, and R.
16+
Currently, Dodona supports programming languages such as Python, JavaScript, Java, Kotlin, C#, C++, bash, Prolog, Haskell, SQL, and R.
1717

1818
On Dodona, teachers can create their own course, built from different exercise series.
1919
They can use existing courses and exercises or choose to create their own exercises and teaching materials.

en/references/judges/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The SQL judge supports both query evaluation (DML) and structural database build
7474
This judge is recommended by the Dodona team.
7575
TESTed is a judge that can be used for multiple programming languages.
7676
It uses a simple custom test format, that is independent of the programming language of the exercise.\
77-
**Programming languages:** Bash, C, C#, Haskell, Java, JavaScript, Kotlin, Python\
77+
**Programming languages:** Bash, C, C#, C++, Haskell, Java, JavaScript, Typescript, Kotlin, Python\
7878
**Get started** [Documentation](/en/guides/exercises/), [examples](https://github.com/dodona-edu/example-exercises/tree/master/tested) \
7979
**Created by:** [Team Dodona](mailto:dodona@ugent.be)
8080

en/references/tested/dsl/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ This name is programming language dependent:
320320
testcases:
321321
- expression:
322322
c: "to_string(1+1)"
323+
cpp: "to_string(1+1)"
323324
haskell: "Submission.toString (1+1)"
324325
runhaskell: "Submission.toString (1+1)"
325326
java: "Submission.toString(1+1)"

en/references/tested/exercise-config/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ TESTed currently uses the following linters:
8383
|------------|--------------------------------------------------------|
8484
| Bash | [Shellcheck](https://www.shellcheck.net/) |
8585
| C | [Cppcheck](http://cppcheck.sourceforge.net/) |
86+
| C++ | [Cppcheck](http://cppcheck.sourceforge.net/) |
8687
| Haskell | [HLint](https://github.com/ndmitchell/hlint) |
8788
| Java | [Checkstyle](https://github.com/checkstyle/checkstyle) |
8889
| JavaScript | [ESLint](https://eslint.org/) |

en/references/tested/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Currently, the following languages are supported:
2323

2424
* Bash
2525
* C (gcc)
26+
* C++ (g++)
2627
* Haskell (ghc)
2728
* Java
2829
* JavaScript (NodeJS)
@@ -95,6 +96,14 @@ void echo(char* what) {
9596
}
9697
```
9798
99+
```cpp [C++]
100+
#include <iostream>
101+
102+
void echo(std::string what) {
103+
std::cout << what;
104+
}
105+
```
106+
98107
```haskell [Haskell]
99108
echo = putStrLn
100109
```

en/references/tested/types/index.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ The following table gives an overview of basic types supported by TESTed.
3131
The first column contains all basic types,
3232
and the other columns contain the mapping to the data types of the programming languages currently supported by TESTed.
3333

34-
| TESTed | Python | JavaScript | Java | Kotlin | Haskell | C | Bash |
35-
|----------|---------|------------|---------------|-----------|-----------|----------|--------|
36-
| integer | `int` | `number` | `int`/`long`¹ | `Int` | `Int` | `int` | - |
37-
| real | `float` | `number` | `double` | `Double` | `Double` | `double` | - |
38-
| boolean | `bool` | `boolean` | `boolean` | `Boolean` | `Bool` | `bool` | - |
39-
| text | `str` | `String` | `String` | `String` | `String` | `char*` | `text` |
40-
| sequence | `list` | `array` | `List` | `List` | `[]`² | - | - |
41-
| set | `set` | `Set` | `Set` | `Set` | - | - | - |
42-
| map | `dict` | `object` | `Map` | `Map` | - | - | - |
43-
| nothing | `None` | `null` | `null` | `null` | `Nothing` | `void` | - |
34+
| TESTed | Python | JavaScript | Java | Kotlin | Haskell | C | Bash | C++ |
35+
|----------|---------|------------|---------------|-----------|-----------|----------|--------|-----------------|
36+
| integer | `int` | `number` | `int`/`long`¹ | `Int` | `Int` | `int` | - | `std::intmax_t` |
37+
| real | `float` | `number` | `double` | `Double` | `Double` | `double` | - | `double` |
38+
| boolean | `bool` | `boolean` | `boolean` | `Boolean` | `Bool` | `bool` | - | `bool` |
39+
| text | `str` | `String` | `String` | `String` | `String` | `char*` | `text` | `std::string` |
40+
| sequence | `list` | `array` | `List` | `List` | `[]`² | - | - | `std::vector` |
41+
| set | `set` | `Set` | `Set` | `Set` | - | - | - | `std::set` |
42+
| map | `dict` | `object` | `Map` | `Map` | - | - | - | `std::map` |
43+
| nothing | `None` | `null` | `null` | `null` | `Nothing` | `void` | - | `void` |
4444

4545
¹ depending on the value
4646
² the built-in list type
@@ -78,26 +78,26 @@ and the second column contains their corresponding basic type.
7878
The other columns contain the mapping to the data types of the programming languages currently supported by TESTed.
7979
An explanation of the symbols used in the table follows after the table itself.
8080

81-
| TESTed | Basic | Python | JavaScript | Java | Kotlin | Haskell | C | Bash |
82-
|------------------|----------|-----------|-------------|--------------|--------------|--------------------|------------------|------|
83-
| int8 | integer | + | + | `byte` | `Byte` | `Data.Int.Int8` | + | - |
84-
| uint8 | integer | + | + | + | `UByte` | `Data.Word.Word8` | + | - |
85-
| int16 | integer | + | + | `short` | `Short` | `Data.Int.Int16` | `short` | - |
86-
| uint16 | integer | + | + | + | `UShort` | `Data.Word.Word16` | `unsigned short` | - |
87-
| int32 | integer | + | + | `int` | `Int` | `Data.Int.Int32` | `int` | - |
88-
| uint32 | integer | + | + | + | `UInt` | `Data.Word.Word32` | `unsigned int` | - |
89-
| int64 | integer | + | + | `long` | `Long` | `Data.Int.Int64` | `long` | - |
90-
| uint64 | integer | + | + | + | `ULong` | `Data.Word.Word64` | `unsigned long` | - |
91-
| bigint | integer | `int` | `BigInt` | `BigInteger` | `BigInteger` | `Integer` | - | - |
92-
| single_precision | real | + | + | `float` | `Float` | `Float` | `float` | - |
93-
| double_precision | real | + | + | `double` | `Double` | `Double` | `double` | - |
94-
| double_extended | real | + | + | + | + | - | `double double` | - |
95-
| fixed_precision | rational | `Decimal` | - | `BigDecimal` | `BigDecimal` | - | - | - |
96-
| array | sequence | + | + | `array` | `Array` | - | - | - |
97-
| list | sequence | `List` | + | `List` | `List` | `[]`² | - | - |
98-
| tuple | sequence | `Tuple` | + | + | + | `()`¹ | - | - |
99-
| char | text | + | + | `char` | `Char` | `Char` | `char` | + |
100-
| undefined | nothing | + | `undefined` | + | + | + | + | - |
81+
| TESTed | Basic | Python | JavaScript | Java | Kotlin | Haskell | C | Bash | C++ |
82+
|------------------|----------|-----------|-------------|--------------|--------------|--------------------|------------------|------|-----------------|
83+
| int8 | integer | + | + | `byte` | `Byte` | `Data.Int.Int8` | + | - | `std::int8_t` |
84+
| uint8 | integer | + | + | + | `UByte` | `Data.Word.Word8` | + | - | `std::uint8_t` |
85+
| int16 | integer | + | + | `short` | `Short` | `Data.Int.Int16` | `short` | - | `std::int16_t` |
86+
| uint16 | integer | + | + | + | `UShort` | `Data.Word.Word16` | `unsigned short` | - | `std::uint16_t` |
87+
| int32 | integer | + | + | `int` | `Int` | `Data.Int.Int32` | `int` | - | `std::int32_t` |
88+
| uint32 | integer | + | + | + | `UInt` | `Data.Word.Word32` | `unsigned int` | - | `std::uint32_t` |
89+
| int64 | integer | + | + | `long` | `Long` | `Data.Int.Int64` | `long` | - | `std::int64_t` |
90+
| uint64 | integer | + | + | + | `ULong` | `Data.Word.Word64` | `unsigned long` | - | `std::uint64_t` |
91+
| bigint | integer | `int` | `BigInt` | `BigInteger` | `BigInteger` | `Integer` | - | - | `std::intmax_t` |
92+
| single_precision | real | + | + | `float` | `Float` | `Float` | `float` | - | `float` |
93+
| double_precision | real | + | + | `double` | `Double` | `Double` | `double` | - | `double` |
94+
| double_extended | real | + | + | + | + | - | `double double` | - | `long double` |
95+
| fixed_precision | rational | `Decimal` | - | `BigDecimal` | `BigDecimal` | - | - | - | - |
96+
| array | sequence | + | + | `array` | `Array` | - | - | - | `std::vector` |
97+
| list | sequence | `List` | + | `List` | `List` | `[]`² | - | - | `std::list` |
98+
| tuple | sequence | `Tuple` | + | + | + | `()`¹ | - | - | `std::tuple` |
99+
| char | text | + | + | `char` | `Char` | `Char` | `char` | + | `char` |
100+
| undefined | nothing | + | `undefined` | + | + | + | + | - | + |
101101

102102
¹ built-in tuple type
103103
² built-in list type

nl/guides/exercises/testsuites/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Om te controleren of dat een ingediende oplossing juist is, gebruikt Dodona test
99
Dat testplan bevat een reeks testgevallen, die ervoor zorgen dat je redelijk zeker bent of een oplossing juist is of niet.
1010

1111
In deze handleiding bespreken we kort de structuur, gevolgd door de verschillende mogelijkheden.
12-
Hier gebruiken we TESTed: de aanbevolen manier om oefeningen te maken voor **Python**, **JavaScript**, **Java**, **Kotlin**, **C**, **C#**, **Haskell** en **Bash**.
12+
Hier gebruiken we TESTed: de aanbevolen manier om oefeningen te maken voor **Python**, **JavaScript**, **Java**, **Kotlin**, **C**, **C#**, **C++**, **Haskell** en **Bash**.
1313
Moest je iets willen doen dat TESTed niet kan of je wilt een andere programmeertaal gebruiken, kijk dan eerst naar het [overzicht van alle judges](/nl/references/judges).
1414

1515
Deze handleiding bevat geavanceerdere concepten.
@@ -333,6 +333,7 @@ In onderstaande voorbeeld wordt een functie opgeroepen met als argument de som v
333333
testcases:
334334
- expression:
335335
c: "to_string(1+1)"
336+
cpp: "to_string(1+1)"
336337
haskell: "Submission.toString (1+1)"
337338
runhaskell: "Submission.toString (1+1)"
338339
java: "Submission.toString(1+1)"

0 commit comments

Comments
 (0)