{"size": 1248, "ext": "js", "max_stars_repo_path": "test/classes.js", "max_stars_repo_name": "ajlopez/AjTalkJs", "max_stars_repo_stars_event_min_datetime": "2016-07-11T04:10:17.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-25T00:43:48.000Z", "max_issues_repo_path": "test/classes.js", "max_issues_repo_name": "ajlopez/AjTalkJs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/classes.js", "max_forks_repo_name": "ajlopez/AjTalkJs", "max_forks_repo_forks_event_min_datetime": "2016-07-11T04:10:18.000Z", "max_forks_repo_forks_event_max_datetime": "2016-07-11T04:10:18.000Z"}
{"max_stars_count": 6, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 27.7333333333, "max_line_length": 67, "alphanum_fraction": 0.6378205128}

var ajtalk = require('..'),
    path = require('path');

exports['load SimplePoint'] = function (test) {    
    ajtalk.load(path.join(__dirname, 'files',  'SimplePoint.st'));

    test.ok(ajtalk.Smalltalk.SimplePoint);
}

exports['create SimplePoint'] = function (test) {
    var result = ajtalk.execute('SimplePoint new');
    
    test.ok(result);
    test.strictEqual(result.$x, 0);
    test.strictEqual(result.$y, 0);
    
    test.strictEqual(result.x(), 0);
    test.strictEqual(result.y(), 0);
}

exports['load SimpleClass'] = function (test) {
    ajtalk.load(path.join(__dirname, 'files',  'SimpleClass.st'));

    test.ok(ajtalk.Smalltalk.SimpleClass);
    test.ok(ajtalk.Smalltalk.SimpleSubclass);
}

exports['create and invoke SimpleClass'] = function (test) {
    ajtalk.load(path.join(__dirname, 'files',  'SimpleClass.st'));
    var result = ajtalk.execute('SimpleClass new one');
    test.ok(result);
    test.strictEqual(result, 1);
}

exports['create and invoke SimpleSubclass'] = function (test) {
    ajtalk.load(path.join(__dirname, 'files',  'SimpleClass.st'));
    var result = ajtalk.execute('SimpleSubclass new two');
    test.ok(result);
    test.strictEqual(result, 2);
}



