|
517 | 517 | (** Grading function for variables and references. *) |
518 | 518 | module Test_functions_ref_var : sig |
519 | 519 |
|
520 | | - (** [test_ref ty got exp] returns {!LearnOcaml_report.Success 1} |
| 520 | + (** [test_ref ty got exp] returns {!Learnocaml_report.Success 1} |
521 | 521 | report if reference [got] value is equal to [exp] and |
522 | | - {!LearnOcaml_report.Failure} report otherwise. |
| 522 | + {!Learnocaml_report.Failure} report otherwise. |
523 | 523 |
|
524 | 524 | {e WARNING:} contrary to other grading functions, you cannot |
525 | 525 | use this function to evaluate a reference defined or modified |
|
529 | 529 | val test_ref : |
530 | 530 | 'a Ty.ty -> 'a ref -> 'a -> Learnocaml_report.t |
531 | 531 |
|
532 | | - (** [test_variable ty name r] returns {!LearnOcaml_report.Success |
| 532 | + (** [test_variable ty name r] returns {!Learnocaml_report.Success |
533 | 533 | 1} report if variable named [name] exists and is equal to |
534 | | - [r]. Otherwise returns {!LearnOcaml_report.Failure} report.*) |
| 534 | + [r]. Otherwise returns {!Learnocaml_report.Failure} report.*) |
535 | 535 | val test_variable : |
536 | 536 | 'a Ty.ty -> string -> 'a -> Learnocaml_report.t |
537 | 537 |
|
538 | 538 | (** [test_variable_property ty name cb] returns the report |
539 | 539 | resulting of application of cb to variable named [name] if it |
540 | | - exists. Otherwise returns {!LearnOcaml_report.Failure} report. *) |
| 540 | + exists. Otherwise returns {!Learnocaml_report.Failure} report. *) |
541 | 541 | val test_variable_property : |
542 | 542 | 'a Ty.ty -> string -> ('a -> Learnocaml_report.t) -> Learnocaml_report.t |
543 | 543 |
|
544 | | - (** [test_variable ty name r] returns {!LearnOcaml_report.Success |
| 544 | + (** [test_variable ty name r] returns {!Learnocaml_report.Success |
545 | 545 | 1} report if variable named [name] exists and is equal to |
546 | 546 | variable with the same name defined in solution. Otherwise returns |
547 | | - {!LearnOcaml_report.Failure} report.*) |
| 547 | + {!Learnocaml_report.Failure} report.*) |
548 | 548 | val test_variable_against_solution : |
549 | 549 | 'a Ty.ty -> string -> Learnocaml_report.t |
550 | 550 |
|
|
620 | 620 | outputs. |
621 | 621 |
|
622 | 622 | A test [(arg-1, r, out, err)] results in a |
623 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 623 | + {!Learnocaml_report.Success 1} report if the student function |
624 | 624 | applied to [arg-1] is equal to [r] and if standard output and |
625 | 625 | standard error messages match [out] and [err] respectively. The |
626 | 626 | result of a test is a {!Learnocaml_report.Failure} report otherwise. |
|
642 | 642 | named [name] by comparing outputs obtained with the student |
643 | 643 | function against outputs of [rf]. |
644 | 644 |
|
645 | | - A test [arg-1] results in a {!LearnOcaml_report.Success 1} report |
| 645 | + A test [arg-1] results in a {!Learnocaml_report.Success 1} report |
646 | 646 | if the student function applied to [arg-1] gives the same |
647 | 647 | result than the solution function [rf] applied to [arg-1]. Otherwise |
648 | 648 | the result of a test is a {!Learnocaml_report.Failure} report. |
|
668 | 668 | which must be defined under name [name] in the corresponding |
669 | 669 | [solution.ml] file. |
670 | 670 |
|
671 | | - A test [arg-1] results in a {!LearnOcaml_report.Success 1} report |
| 671 | + A test [arg-1] results in a {!Learnocaml_report.Success 1} report |
672 | 672 | if the student function applied to [arg-1] gives the same |
673 | 673 | result than the solution function [rf] applied to |
674 | 674 | [arg-1]. Otherwise the result of a test is a |
|
713 | 713 | outputs. |
714 | 714 |
|
715 | 715 | A test [(arg-1, arg-2, r, out, err)] results in a |
716 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 716 | + {!Learnocaml_report.Success 1} report if the student function |
717 | 717 | applied to [arg-1] and [arg-2] is equal to [r] and if standard |
718 | 718 | output and standard error messages match [out] and [err] |
719 | 719 | respectively. The result of a test is a |
|
738 | 738 | named [name] by comparing outputs obtained with the student |
739 | 739 | function against outputs of [rf]. |
740 | 740 |
|
741 | | - A test [(arg-1, arg-2)] results in a {!LearnOcaml_report.Success |
| 741 | + A test [(arg-1, arg-2)] results in a {!Learnocaml_report.Success |
742 | 742 | 1} report if the student function applied to [arg-1] and |
743 | 743 | [arg-2] gives the same result than the solution function [rf] |
744 | 744 | applied to the same arguments. Otherwise the result of a test is a |
|
768 | 768 | be defined under name [name] in the corresponding [solution.ml] |
769 | 769 | file. |
770 | 770 |
|
771 | | - A test [(arg-1, arg-2)] results in a {!LearnOcaml_report.Success |
| 771 | + A test [(arg-1, arg-2)] results in a {!Learnocaml_report.Success |
772 | 772 | 1} report if the student function applied to [arg-1] and |
773 | 773 | [arg-2] gives the same result than the solution function [rf] |
774 | 774 | applied to the same arguments. Otherwise the result of a test |
|
813 | 813 | outputs. |
814 | 814 |
|
815 | 815 | A test [(arg-1, arg-2, arg-3, r, out, err)] results in a |
816 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 816 | + {!Learnocaml_report.Success 1} report if the student function |
817 | 817 | applied to [arg-1], [arg-2] and [arg-3] is equal to [r] and if |
818 | 818 | standard output and standard error messages match [out] and |
819 | 819 | [err] respectively. The result of a test is a |
|
838 | 838 | function against outputs of [rf]. |
839 | 839 |
|
840 | 840 | A test [(arg-1, arg-2, arg-3)] results in a |
841 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 841 | + {!Learnocaml_report.Success 1} report if the student function |
842 | 842 | applied to [arg-1], [arg-2] and [arg-3] gives the same result |
843 | 843 | than the solution function [rf] applied to the same |
844 | 844 | arguments. Otherwise the result of a test is a |
|
870 | 870 | file. |
871 | 871 |
|
872 | 872 | A test [(arg-1, arg-2, arg-3)] results in a |
873 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 873 | + {!Learnocaml_report.Success 1} report if the student function |
874 | 874 | applied to [arg-1], [arg-2] and [arg-3] gives the same result |
875 | 875 | than the solution function [rf] applied to the same |
876 | 876 | arguments. Otherwise the result of a test is a |
|
916 | 916 | outputs. |
917 | 917 |
|
918 | 918 | A test [(arg-1, arg-2, arg-3, arg-4, r, out, err)] results in a |
919 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 919 | + {!Learnocaml_report.Success 1} report if the student function |
920 | 920 | applied to [arg-1], [arg-2], [arg-3] and [arg-4] is equal to |
921 | 921 | [r] and if standard output and standard error messages match |
922 | 922 | [out] and [err] respectively. The result of a test is a |
|
942 | 942 | function against outputs of [rf]. |
943 | 943 |
|
944 | 944 | A test [(arg-1, arg-2, arg-3m arg-4)] results in a |
945 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 945 | + {!Learnocaml_report.Success 1} report if the student function |
946 | 946 | applied to [arg-1], [arg-2], [arg-3] and [arg-4] gives the same |
947 | 947 | result than the solution function [rf] applied to the same |
948 | 948 | arguments. Otherwise the result of a test is a |
|
972 | 972 | [solution.ml] file. |
973 | 973 |
|
974 | 974 | A test [(arg-1, arg-2, arg-3, arg-4)] results in a |
975 | | - {!LearnOcaml_report.Success 1} report if the student function |
| 975 | + {!Learnocaml_report.Success 1} report if the student function |
976 | 976 | applied to [arg-1], [arg-2], [arg-3] and [arg-4] gives the same |
977 | 977 | result than the solution function [rf] applied to the same |
978 | 978 | arguments. Otherwise the result of a test is a |
|
0 commit comments