Annotation of loncom/homework/caparesponse/test.pl, revision 1.2
1.1 albertel 1: use strict;
2: use capa;
3:
1.2 ! albertel 4: my $unit="N";
! 5: my $answer="3.4 N";
1.1 albertel 6: my $scaled="3.2";
7: print("\n return code is (should be 6)".&capa::caparesponse_get_real_response($unit,$answer,\$scaled));
1.2 ! albertel 8: print("\nscaled (should be 0.0034) ".$scaled." unit $unit answer $answer");
1.1 albertel 9: $unit="m";
10: $answer="3.4 mm/J";
11: $scaled=3.2;
12: print("\n return code is (should be 15)".&capa::caparesponse_get_real_response($unit,$answer,\$scaled));
1.2 ! albertel 13: print("\nscaled (should be 3.2) ".$scaled." unit $unit answer $answer");
1.1 albertel 14: print("\n");
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>