Skip to content

Commit

Permalink
Added new basic interpreter tests
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Oct 13, 2021
1 parent d6adf7d commit 5af59b0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/som/BasicInterpreterTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ const tests = [
['IfTrueIfFalse', 'test2', 33, integerClass],
['IfTrueIfFalse', 'test3', 4, integerClass],

['IfTrueIfFalse', 'testIfTrueTrueResult', 'Integer', classClass],
['IfTrueIfFalse', 'testIfTrueFalseResult', 'Nil', classClass],
['IfTrueIfFalse', 'testIfFalseTrueResult', 'Nil', classClass],
['IfTrueIfFalse', 'testIfFalseFalseResult', 'Integer', classClass],

['CompilerSimplification', 'testReturnConstantSymbol', 'constant', symbolClass],
['CompilerSimplification', 'testReturnConstantInt', 42, integerClass],
['CompilerSimplification', 'testReturnSelf', 'CompilerSimplification', classClass],
Expand All @@ -78,9 +83,15 @@ const tests = [
['BlockInlining', 'testOneLevelInliningWithLocalShadowTrue', 2, integerClass],
['BlockInlining', 'testOneLevelInliningWithLocalShadowFalse', 1, integerClass],

['BlockInlining', 'testShadowDoesntStoreWrongLocal', 33, integerClass],
['BlockInlining', 'testShadowDoesntReadUnrelated', 'Nil', classClass],

['BlockInlining', 'testBlockNestedInIfTrue', 2, integerClass],
['BlockInlining', 'testBlockNestedInIfFalse', 42, integerClass],

['BlockInlining', 'testStackDisciplineTrue', 1, integerClass],
['BlockInlining', 'testStackDisciplineFalse', 2, integerClass],

['BlockInlining', 'testDeepNestedInlinedIfTrue', 3, integerClass],
['BlockInlining', 'testDeepNestedInlinedIfFalse', 42, integerClass],

Expand All @@ -103,7 +114,7 @@ const tests = [

['BinaryOperation', 'test', 3 + 8, integerClass],

['NumberOfTests', 'numberOfTests', 57, integerClass],
['NumberOfTests', 'numberOfTests', 65, integerClass],
];

function assertEqualsSomValue(expectedValue, expectedType, actualValue) {
Expand Down

1 comment on commit 5af59b0

@rebenchdb
Copy link

@rebenchdb rebenchdb bot commented on 5af59b0 Oct 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performance changes for cf03d4a...5af59b0

Summary Over All Benchmarks
Summary Over All Benchmarks

Full Report

Please sign in to comment.