blob: a62efe879cd12a39dff6eac95064665f4dc3b909 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
(* Copyright (C) 2017 Ryan Kavanagh <rkavanagh@cs.cmu.edu> *)
(* Distributed under the ISC license, see COPYING for details. *)
functor ChecksHelper (structure H : HELPER) : CHECKS where type checks = H.checks =
struct
datatype checks = datatype H.checks
(*****************************************************)
(********** CONFIGURE ME HERE *******)
(*****************************************************)
val requiredFiles = ["hw0.pdf", "ex1.tut", "ex2.tut"]
(* Returns the score l + h *)
fun check1 l h : real = l + h
(* Is evil and always gives the student 0.0 *)
fun check2 () = 0.0
(* We first make sure all of the required files exist. *)
(* We then grade AutoLab problem "ex1" using the test1 function. *)
(* Finally, we grade AutoLab problem "ex2". *)
val checks = [ H.Check ("all files present", fn _ => H.checkFilesExist requiredFiles)
, H.Check ("hw0.pdf", fn _ => H.checkPDF "hw0.pdf")
, H.Problem ("ex1", fn _ => check1 3.0 4.0)
, H.Problem ("ex2", fn _ => check2 ()) ]
(* Empty scoreboard *)
fun scoreboard _ = NONE
(*****************************************************)
(********** END CONFIGURATION *******)
(*****************************************************)
end
|