mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-07-20 10:52:31 -04:00
Update tests
This commit is contained in:
parent
7ec8864688
commit
d17f0e07b1
1 changed files with 11 additions and 4 deletions
|
@ -241,8 +241,12 @@ function test_move_constructorCoordinate() {
|
||||||
block1.xy_ = coordinate;
|
block1.xy_ = coordinate;
|
||||||
|
|
||||||
var event = new Blockly.Events.Move(block1);
|
var event = new Blockly.Events.Move(block1);
|
||||||
checkExactEventValues(event, {'oldCoordinate': coordinate,
|
// Need to check for individual equality of the coordinate values since
|
||||||
'type': 'move'});
|
// the move event creates a new goog.math.Coordinate object
|
||||||
|
assertEquals(event.oldCoordinate.x, coordinate.x);
|
||||||
|
assertEquals(event.oldCoordinate.y, coordinate.y);
|
||||||
|
assertEquals(event.type, 'move');
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
eventTest_tearDownWithMockBlocks();
|
eventTest_tearDownWithMockBlocks();
|
||||||
}
|
}
|
||||||
|
@ -277,8 +281,11 @@ function test_blockMove_constructorCoordinate() {
|
||||||
block1.xy_ = coordinate;
|
block1.xy_ = coordinate;
|
||||||
|
|
||||||
var event = new Blockly.Events.BlockMove(block1);
|
var event = new Blockly.Events.BlockMove(block1);
|
||||||
checkExactEventValues(event, {'oldCoordinate': coordinate,
|
// Need to check for individual equality of the coordinate values since
|
||||||
'type': 'move'});
|
// the move event creates a new goog.math.Coordinate object
|
||||||
|
assertEquals(event.oldCoordinate.x, coordinate.x);
|
||||||
|
assertEquals(event.oldCoordinate.y, coordinate.y);
|
||||||
|
assertEquals(event.type, 'move');
|
||||||
} finally {
|
} finally {
|
||||||
eventTest_tearDownWithMockBlocks();
|
eventTest_tearDownWithMockBlocks();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue