Add assignment 2 skeleton

This commit is contained in:
Jeehoon Kang
2022-08-30 02:28:54 +09:00
parent a11ff5a783
commit 84548a8325
3 changed files with 41 additions and 0 deletions

34
scripts/grade-02.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/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.
cargo fmt --check
cargo clippy
# Executes test for each runner.
for RUNNER in "${RUNNERS[@]}"; do
echo "Running with $RUNNER..."
TESTS=("--lib assignment02_grade")
if [ $(run_tests) -ne 0 ]; then
exit 1
fi
done
exit 0

View File

@@ -0,0 +1,3 @@
//! Assignment 2: Mastering common programming concepts (1/2).
// TODO: use exercises in <https://doc.rust-lang.org/book/ch03-05-control-flow.html>

View File

@@ -0,0 +1,4 @@
#[cfg(test)]
mod test {
use super::super::assignment02::*;
}