diff --git a/README.md b/README.md index 917cea3..60ac907 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,15 @@ Make sure that you're capable of using the following development tools: - We'll announce **all** assignments before the semester begins. - Submit your solution to . - Read the documentation at . +- You can check your grade of each assignment by running the grading script. + - You can run the grading script with the following command: + ```bash + $ ./scripts/grade.sh + ``` + - E.g. To grade `assignment09`, run the following command: + ```bash + $ ./scripts/grade.sh 9 + ``` - You're **allowed** to use ChatGPT or other LLMs. Instead, you'll solve more problems than previous semesters. diff --git a/scripts/grade-01.sh b/scripts/grade-01.sh deleted file mode 100755 index 4add88a..0000000 --- a/scripts/grade-01.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment01") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-02.sh b/scripts/grade-02.sh deleted file mode 100755 index 2d50a5c..0000000 --- a/scripts/grade-02.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment02") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-03.sh b/scripts/grade-03.sh deleted file mode 100755 index 4e9f47e..0000000 --- a/scripts/grade-03.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment03") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-04.sh b/scripts/grade-04.sh deleted file mode 100755 index 2f0fdc7..0000000 --- a/scripts/grade-04.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment04") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-06.sh b/scripts/grade-06.sh deleted file mode 100755 index bd89d59..0000000 --- a/scripts/grade-06.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment06") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-07.sh b/scripts/grade-07.sh deleted file mode 100755 index 766286d..0000000 --- a/scripts/grade-07.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment07") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-08.sh b/scripts/grade-08.sh deleted file mode 100755 index 815f90d..0000000 --- a/scripts/grade-08.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment08") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-09.sh b/scripts/grade-09.sh deleted file mode 100755 index fc449ea..0000000 --- a/scripts/grade-09.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment09") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-10.sh b/scripts/grade-10.sh deleted file mode 100755 index 87897bb..0000000 --- a/scripts/grade-10.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment10") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-11.sh b/scripts/grade-11.sh deleted file mode 100755 index 34fb51a..0000000 --- a/scripts/grade-11.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment11") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-12.sh b/scripts/grade-12.sh deleted file mode 100755 index 3c1609e..0000000 --- a/scripts/grade-12.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment12") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-13.sh b/scripts/grade-13.sh deleted file mode 100755 index c490775..0000000 --- a/scripts/grade-13.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -uo pipefail -IFS=$'\n\t' - -# Imports library. -BASEDIR=$(dirname "$0") -source $BASEDIR/grade-utils.sh - -RUNNERS=( - "cargo" - "cargo --release" - "cargo_asan" - "cargo_asan --release" - "cargo_tsan" - "cargo_tsan --release" -) - -# Lints. -run_linters || exit 1 - -# Executes test for each runner. -for RUNNER in "${RUNNERS[@]}"; do - echo "Running with $RUNNER..." - - TESTS=("--lib assignment13") - if [ $(run_tests) -ne 0 ]; then - exit 1 - fi -done - -exit 0 diff --git a/scripts/grade-utils.sh b/scripts/grade-utils.sh index 8244ee5..5ac48fa 100755 --- a/scripts/grade-utils.sh +++ b/scripts/grade-utils.sh @@ -76,17 +76,19 @@ _run_tests_with() { exit 1 fi - local FAILED=0 - for TEST in "${TESTS[@]}"; do - local TEST_CMD="$CARGO test $* $TEST" - timeout ${TIMEOUT:-20s} bash -c "$TEST_CMD 2>/dev/null" 1>&2 + local PASSED=0 + # local NUM_TESTS=$(echo $TESTS | wc -w) + for TEST in ${TESTS[@]}; do + local TEST_CMD="$CARGO test $* --lib -- $TEST" + timeout ${TIMEOUT:-20s} bash -c "$TEST_CMD 2> /dev/null" 1>&2 case $? in - 0) ;; - 124) echo_err "Test timed out: $TEST_CMD"; FAILED=$((FAILED + 1));; - *) echo_err "Test failed: $TEST_CMD"; FAILED=$((FAILED + 1));; + 0) PASSED=$((PASSED + 1));; + 124) echo_err "Test timed out: $TEST_CMD";; + *) echo_err "Test failed: $TEST_CMD";; esac done - echo $FAILED + + echo $PASSED } # example: run_tests diff --git a/scripts/grade.sh b/scripts/grade.sh new file mode 100755 index 0000000..6ef01ba --- /dev/null +++ b/scripts/grade.sh @@ -0,0 +1,115 @@ +#!/usr/bin/env bash + +set -e +set -uo pipefail +IFS=$'\n\t' + +# Imports library. +BASEDIR=$(dirname "$0") +source $BASEDIR/grade-utils.sh + +RUNNER="cargo" + +# Lints. +run_linters || exit 1 + +# Executes test for each runner. +echo "Running with $RUNNER..." + +if [ $# != 1 ] + then + echo "===============================" + echo "Invalid argument." + echo "Usage: './grade.sh '" + echo "Example: './grade.sh 1' to grade assignment01" + exit 1 +fi +TEST_NAME=$(printf "TEST%02d" $1) +case $TEST_NAME in + TEST01) + TESTS=( + "assignments::assignment01::small_exercises_grade::test" + ) + ;; + TEST02) + TESTS=( + "assignments::assignment02::small_exercises_grade::test" + "assignments::assignment02::vec_and_mat_grade::test" + ) + ;; + TEST03) + TESTS=( + "assignments::assignment03::custom_operators_grade::test" + "assignments::assignment03::parse_shell_grade::test" + "assignments::assignment03::small_exercises_grade::test" + ) + ;; + TEST04) + TESTS=( + "assignments::assignment04::grade::test" + ) + ;; + TEST06) + TESTS=( + "assignments::assignment06::semiring_grade::test" + "assignments::assignment06::symbolic_differentiation_grade::test" + ) + ;; + TEST07) + TESTS=( + "assignments::assignment07::generator_grade::test" + "assignments::assignment07::my_itertools_grade::test" + "assignments::assignment07::small_exercises_grade::test" + "assignments::assignment07::transform_grade::test" + ) + ;; + TEST08) + TESTS=( + "assignments::assignment08::church_grade::test" + "assignments::assignment08::small_exercises_grade::test" + ) + ;; + TEST09) + TESTS=( + "assignments::assignment09::bigint_grade::test" + "assignments::assignment09::small_exercises_grade::test" + ) + ;; + TEST10) + TESTS=( + "assignments::assignment10::labyrinth_grade::test" + "assignments::assignment10::small_exercises_grade::test" + ) + ;; + TEST11) + TESTS=( + "assignments::assignment11::graph_grade::test_graph" + "assignments::assignment11::linked_list_grade::test_linked_list" + "assignments::assignment11::mock_storage_grade::test_mock_storage" + "assignments::assignment11::tv_room_grade::test_tv_room" + ) + ;; + TEST12) + TESTS=( + "assignments::assignment12::card_grade" + "assignments::assignment12::demux_grade::test_demux" + "assignments::assignment12::funnel_grade::test_funnel" + "assignments::assignment12::small_exercises_grade::test_pingpong" + ) + ;; + TEST13) + TESTS=( + "assignments::assignment13::small_exercises_grade::test" + ) + ;; + *) + echo_err "Invalid assignment number: $1" + echo_err "Assignment number should be within 1 to 12." + exit 1 + ;; +esac + +# Runs tests. +SCORE=$(run_tests) +NUM_TESTS=${#TESTS[@]} +echo Your score: ${SCORE}/${NUM_TESTS} diff --git a/src/assignments/assignment01/mod.rs b/src/assignments/assignment01/mod.rs index dfcc07f..6db0c9c 100644 --- a/src/assignments/assignment01/mod.rs +++ b/src/assignments/assignment01/mod.rs @@ -3,8 +3,8 @@ //! The primary goal of this assignment is bringing up SSH, VSCode, and all the other necessary tools to develop Rust programs. //! Please make sure you're comfortable with developing Rust programs before moving on to the next assignments. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-01.sh` works fine. -//! See `assigment01/small_exercises_grade.rs` and `/scripts/grade-01.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 1` works fine. +//! See `assigment01/small_exercises_grade.rs` and `/scripts/grade.sh 1` for the test script. pub mod small_exercises; mod small_exercises_grade; diff --git a/src/assignments/assignment01/small_exercises.rs b/src/assignments/assignment01/small_exercises.rs index a85884d..eaa5358 100644 --- a/src/assignments/assignment01/small_exercises.rs +++ b/src/assignments/assignment01/small_exercises.rs @@ -1,8 +1,8 @@ //! Assignment 1: Preparing Rust Development Environment. //! Welcome to the CS220 course! //! -//! You should fill out `add()` and `sub()` function bodies in such a way that `/scripts/grade-01.sh` works fine. -//! See `small_problems_grade.rs` and `/scripts/grade-01.sh` for the test script. +//! You should fill out `add()` and `sub()` function bodies in such a way that `/scripts/grade.sh 1` works fine. +//! See `small_problems_grade.rs` and `/scripts/grade.sh 1` for the test script. //! //! Hint: diff --git a/src/assignments/assignment02/mod.rs b/src/assignments/assignment02/mod.rs index 282c04c..cceadfd 100644 --- a/src/assignments/assignment02/mod.rs +++ b/src/assignments/assignment02/mod.rs @@ -3,8 +3,8 @@ //! The primary goal of this assignment is to re-learn the common programming concepts in Rust, especially those in the Rust Book chapters 3 and 5. //! Please make sure you're comfortable with the concepts to proceed on to the next assignments. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-02.sh` works fine. -//! See `assigment02/*_grade.rs` and `/scripts/grade-02.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 2` works fine. +//! See `assigment02/*_grade.rs` and `/scripts/grade.sh 2` for the test script. pub mod small_exercises; mod small_exercises_grade; diff --git a/src/assignments/assignment03/mod.rs b/src/assignments/assignment03/mod.rs index 1c950e0..59b0201 100644 --- a/src/assignments/assignment03/mod.rs +++ b/src/assignments/assignment03/mod.rs @@ -1,7 +1,7 @@ //! Assignment 3: Mastering common programming concepts (2/2) //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-03.sh` works fine. -//! See `assignment03/*_grade.rs` and `/scripts/grade-03.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 3` works fine. +//! See `assignment03/*_grade.rs` and `/scripts/grade.sh 3` for the test script. pub mod small_exercises; mod small_exercises_grade; diff --git a/src/assignments/assignment04/mod.rs b/src/assignments/assignment04/mod.rs index ceb0a8c..29a218e 100644 --- a/src/assignments/assignment04/mod.rs +++ b/src/assignments/assignment04/mod.rs @@ -11,8 +11,8 @@ //! //! For calculator, just reading `syntax.rs` would suffice for you to understand what to do. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-04.sh` works fine. -//! See `assignment04/grade.rs` and `/scripts/grade-04.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 4` works fine. +//! See `assignment04/grade.rs` and `/scripts/grade.sh 4` for the test script. //! Run `/scripts/prepare-submissions.sh` and submit `/target/assignment04.zip` to . pub mod context; diff --git a/src/assignments/assignment06/mod.rs b/src/assignments/assignment06/mod.rs index 8727bc1..fc94881 100644 --- a/src/assignments/assignment06/mod.rs +++ b/src/assignments/assignment06/mod.rs @@ -2,8 +2,8 @@ //! //! The primary goal of this assignment is to understand generics, traits, and lifetimes. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-06.sh` works fine. -//! See `assignment06/*_grade.rs` and `/scripts/grade-06.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 6` works fine. +//! See `assignment06/*_grade.rs` and `/scripts/grade.sh 6` for the test script. pub mod semiring; pub mod symbolic_differentiation; diff --git a/src/assignments/assignment06/symbolic_differentiation.rs b/src/assignments/assignment06/symbolic_differentiation.rs index 2269d13..f46c5fc 100644 --- a/src/assignments/assignment06/symbolic_differentiation.rs +++ b/src/assignments/assignment06/symbolic_differentiation.rs @@ -6,7 +6,7 @@ use std::ops::*; /// Rational number represented by two isize, numerator and denominator. /// /// Each Rational number should be normalized so that `demoninator` is nonnegative and `numerator` and `demoninator` are coprime. -/// See [`normalize`] for examples. As a corner case, 0 is represented by Rational { numerator: 0, demoninator: 0 }. +/// See `normalize` for examples. As a corner case, 0 is represented by Rational { numerator: 0, demoninator: 0 }. /// /// For "natural use", Rational also overloads standard arithmetic operations, i.e, `+`, `-`, `*`, `/`. /// diff --git a/src/assignments/assignment07/mod.rs b/src/assignments/assignment07/mod.rs index 0dbfcd7..9cde5ba 100644 --- a/src/assignments/assignment07/mod.rs +++ b/src/assignments/assignment07/mod.rs @@ -2,8 +2,8 @@ //! //! The primary goal of this assignment is to understand generics, traits, and lifetimes. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-07.sh` works fine. -//! See `assignment07/*_grade.rs` and `/scripts/grade-07.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 7` works fine. +//! See `assignment07/*_grade.rs` and `/scripts/grade.sh 7` for the test script. pub mod generator; pub mod my_itertools; diff --git a/src/assignments/assignment08/mod.rs b/src/assignments/assignment08/mod.rs index 4125a1a..e784788 100644 --- a/src/assignments/assignment08/mod.rs +++ b/src/assignments/assignment08/mod.rs @@ -2,8 +2,8 @@ //! //! The primary goal of this assignment is to get used to first-class functions. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-08.sh` works fine. -//! See `assignment08/*_grade.rs` and `/scripts/grade-08.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 8` works fine. +//! See `assignment08/*_grade.rs` and `/scripts/grade.sh 8` for the test script. pub mod church; pub mod small_exercises; diff --git a/src/assignments/assignment09/bigint.rs b/src/assignments/assignment09/bigint.rs index 33a96e5..b1a1f51 100644 --- a/src/assignments/assignment09/bigint.rs +++ b/src/assignments/assignment09/bigint.rs @@ -11,7 +11,7 @@ use std::{iter::zip, ops::*}; /// For example, the vector `vec![44,345,3]` represents the integer /// `44 * (2^32)^2 + 345 * (2^32) + 3`, /// and the vector `vec![u32::MAX - 5, u32::MAX - 7]` represents the integer -/// `- (5 * 2^32 + 8) +/// `- (5 * 2^32 + 8)` /// /// You will implement the `Add` and `Sub` trait for this type. /// diff --git a/src/assignments/assignment09/mod.rs b/src/assignments/assignment09/mod.rs index 9fa8940..68c8e61 100644 --- a/src/assignments/assignment09/mod.rs +++ b/src/assignments/assignment09/mod.rs @@ -2,8 +2,8 @@ //! //! The primary goal of this assignment is to get used to iterators. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-09.sh` works fine. -//! See `assignment09/*_grade.rs` and `/scripts/grade-09.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 9` works fine. +//! See `assignment09/*_grade.rs` and `/scripts/grade.sh 9` for the test script. pub mod bigint; pub mod matmul; diff --git a/src/assignments/assignment10/mod.rs b/src/assignments/assignment10/mod.rs index 7fc988f..18073b0 100644 --- a/src/assignments/assignment10/mod.rs +++ b/src/assignments/assignment10/mod.rs @@ -1,8 +1,8 @@ //! Assignment 10: Iterators (2/2). //! The primary goal of this assignment is to get used to iterators. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-10.sh` works fine. -//! See `assignment10/*_grade.rs` and `/scripts/grade-10.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 10` works fine. +//! See `assignment10/*_grade.rs` and `/scripts/grade.sh 10` for the test script. pub mod labyrinth; pub mod small_exercises; diff --git a/src/assignments/assignment11/graph.rs b/src/assignments/assignment11/graph.rs index 7c3ca6f..7f8f823 100644 --- a/src/assignments/assignment11/graph.rs +++ b/src/assignments/assignment11/graph.rs @@ -90,7 +90,7 @@ impl SubGraph { } /// Returns true iff the subgraph contains a cycle. Nodes that do not belong to this subgraph - /// are ignored. See https://en.wikipedia.org/wiki/Cycle_(graph_theory) for an algorithm. + /// are ignored. See for an algorithm. pub fn detect_cycle(&self) -> bool { todo!() } diff --git a/src/assignments/assignment11/mod.rs b/src/assignments/assignment11/mod.rs index 1802da6..32bc143 100644 --- a/src/assignments/assignment11/mod.rs +++ b/src/assignments/assignment11/mod.rs @@ -1,7 +1,7 @@ //! Assignment 11: Familiarizing with smart pointers. //! -//! You should fill out `todo!()` placeholders in such a way that `/scripts/grade-11.sh` works fine. -//! See `assignment11/*_grade.rs` and `/scripts/grade-11.sh` for the test script. +//! You should fill out `todo!()` placeholders in such a way that `/scripts/grade.sh 11` works fine. +//! See `assignment11/*_grade.rs` and `/scripts/grade.sh 11` for the test script. //! Run `/scripts/prepare-submissions.sh` and submit `/target/assignment11.zip` to . pub mod graph; diff --git a/src/assignments/assignment12/mod.rs b/src/assignments/assignment12/mod.rs index 3dd2a96..3fad125 100644 --- a/src/assignments/assignment12/mod.rs +++ b/src/assignments/assignment12/mod.rs @@ -2,8 +2,8 @@ //! //! The primary goal of this assignment is to get used to concurrency. //! -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-12.sh` works fine. -//! See `assignment12/*_grade.rs` and `/scripts/grade-12.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 12` works fine. +//! See `assignment12/*_grade.rs` and `/scripts/grade.sh 12` for the test script. pub mod card; pub mod demux; diff --git a/src/assignments/assignment13/mod.rs b/src/assignments/assignment13/mod.rs index 3ea15d4..67fe8d0 100644 --- a/src/assignments/assignment13/mod.rs +++ b/src/assignments/assignment13/mod.rs @@ -3,8 +3,8 @@ //! The primary goal of this assignment is to get used to data parallelism. //! //! Refer to your solution for assignment 09. You will implement the parallelized version of assignment 09. -//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade-13.sh` works fine. -//! See `assignment13/small_exercises_grade.rs` and `/scripts/grade-13.sh` for the test script. +//! You should fill out the `todo!()` placeholders in such a way that `/scripts/grade.sh 13` works fine. +//! See `assignment13/small_exercises_grade.rs` and `/scripts/grade.sh 13` for the test script. pub mod small_exercises; mod small_exercises_grade;