Skip to content
Snippets Groups Projects
Commit e8b58633 authored by Chris Sangwin's avatar Chris Sangwin
Browse files

Further minor changes. New test cases.

parent 04372163
Branches
No related tags found
No related merge requests found
...@@ -81,7 +81,7 @@ $options->set_option('simplify', false); ...@@ -81,7 +81,7 @@ $options->set_option('simplify', false);
$casstrings = array(); $casstrings = array();
$i = 0; $i = 0;
$debug = true; $debug = false;
/* Just consider the last in the array. */ /* Just consider the last in the array. */
$sa = array_reverse($samplearguments); $sa = array_reverse($samplearguments);
$samplearguments2 = array($sa[0]); $samplearguments2 = array($sa[0]);
......
...@@ -26,6 +26,11 @@ defined('MOODLE_INTERNAL') || die(); ...@@ -26,6 +26,11 @@ defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . '/settingslib.php'); require_once(__DIR__ . '/settingslib.php');
require_once(__DIR__ . '/stack/options.class.php'); require_once(__DIR__ . '/stack/options.class.php');
if (defined('MINIMAL_API')) {
require_once(__DIR__ . '/apilib.php');
} else {
require_once(__DIR__ . '/locallib.php');
}
// Useful links. // Useful links.
......
...@@ -611,7 +611,7 @@ class stack_equiv_test_data { ...@@ -611,7 +611,7 @@ class stack_equiv_test_data {
$newarg['title'] = "Solving linear equations (nonsense)"; $newarg['title'] = "Solving linear equations (nonsense)";
$newarg['narrative'] = 'In this argument we "move over" one term, but end up at the right answer.'. $newarg['narrative'] = 'In this argument we "move over" one term, but end up at the right answer.'.
'Actually, the term we "moved over" is zero, which is why we don\'t pick up the problem'; 'Actually, the term we "moved over" is zero, which is why we don\'t pick up the problem';
$newarg['casstring'] = "[6*x-12=3*(x-2),6*x-12+3*(x-2)=0,12*x-24=0,x=2]"; $newarg['casstring'] = "[6*x-12=3*(x-2),6*x-12+3*(x-2)=0,9*x-18=0,x=2]";
$newarg['debuglist'] = "[EMPTYCHAR,EQUIVCHAR,EQUIVCHAR,EQUIVCHAR]"; $newarg['debuglist'] = "[EMPTYCHAR,EQUIVCHAR,EQUIVCHAR,EQUIVCHAR]";
$newarg['outcome'] = true; $newarg['outcome'] = true;
$samplearguments[] = $newarg; $samplearguments[] = $newarg;
...@@ -862,6 +862,14 @@ class stack_equiv_test_data { ...@@ -862,6 +862,14 @@ class stack_equiv_test_data {
$newarg['section'] = 'Inequalities'; $newarg['section'] = 'Inequalities';
$samplearguments[] = $newarg; $samplearguments[] = $newarg;
$newarg = array();
$newarg['title'] = "Solving an trivial inequality";
$newarg['narrative'] = '';
$newarg['casstring'] = "[2*x<x^2,0<x*(x-2),(x>0 and x>2) or (x<0 and x<2),x>2 or x<0]";
$newarg['debuglist'] = "[EMPTYCHAR,EQUIVCHAR,EQUIVCHAR,EQUIVCHAR]";
$newarg['outcome'] = 'unsupported';
$samplearguments[] = $newarg;
$newarg = array(); $newarg = array();
$newarg['title'] = "Solving a quadratic inequality"; $newarg['title'] = "Solving a quadratic inequality";
$newarg['narrative'] = 'Solving quadratic inequalities using reasoning by equivalence.'; $newarg['narrative'] = 'Solving quadratic inequalities using reasoning by equivalence.';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment