Check-in [51ec69316b]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed tests to support the new definition of atoms (can be constructed from numbers).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:51ec69316b4919bf9802a98aa6be353a5ed72acb
User & Date: andy 2015-04-18 18:46:26
Context
2015-04-18
18:47
Added a TODO comment describing the problems around applying the substitution to the body of an expanded clause, instead of appending them as unification goals. check-in: b5c5523821 user: andy tags: trunk
18:46
Fixed tests to support the new definition of atoms (can be constructed from numbers). check-in: 51ec69316b user: andy tags: trunk
18:45
Added an exposed predicate for checking proofs (just checking, no elaboration). check-in: b1dff5705c user: andy tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/terms.js.

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
q.test("Term construction", function(assert) {

    assert.ok(new terms.Atom("a"), "Can construct atoms");
    assert.ok(new terms.Variable("A"), "Can construct variables");
    assert.ok(new terms.Compound('a', []), 
              "Can construct compounds");

    assert.throws(function() {new terms.Atom(1)}, "Can't construct invalid Atoms");
    assert.throws(function() {new terms.Variable(1)}, "Can't construct invalid Variables");
    assert.throws(function() {new terms.Compound(1, [])}, 
                  "Can't construct Compound with invalid head");
    assert.throws(function() {new terms.Compound(new terms.Atom('a'), [1,2,3])},
                  "Can't construct Compound with invalid arguments");
    assert.throws(function() {new terms.Compound(new terms.Atom('a'), {a:5})},
                  "Can't construct Compound with REALLY invalid arguments");

    // TODO: randomize these
    var a = new terms.Atom('a');







<

<
<







16
17
18
19
20
21
22

23


24
25
26
27
28
29
30
q.test("Term construction", function(assert) {

    assert.ok(new terms.Atom("a"), "Can construct atoms");
    assert.ok(new terms.Variable("A"), "Can construct variables");
    assert.ok(new terms.Compound('a', []), 
              "Can construct compounds");


    assert.throws(function() {new terms.Variable(1)}, "Can't construct invalid Variables");


    assert.throws(function() {new terms.Compound(new terms.Atom('a'), [1,2,3])},
                  "Can't construct Compound with invalid arguments");
    assert.throws(function() {new terms.Compound(new terms.Atom('a'), {a:5})},
                  "Can't construct Compound with REALLY invalid arguments");

    // TODO: randomize these
    var a = new terms.Atom('a');