Skip to content

Instantly share code, notes, and snippets.

@bomberstudios
Created October 28, 2010 16:30
Show Gist options
  • Save bomberstudios/651735 to your computer and use it in GitHub Desktop.
Save bomberstudios/651735 to your computer and use it in GitHub Desktop.
test( 'Size command, single object', function(){
assert('An item is selected and its width is 100', fw.selection[0].width, 100);
run_command("Size","Width +1");
assert('Selected item is 1 pixel wider', fw.selection[0].width, 101);
run_command("Size","Width +10");
assert('Selected item is 10 pixels wider', fw.selection[0].width, 111);
run_command("Size","Height +1");
assert('Selected item is 1 pixel taller', fw.selection[0].height, 101);
run_command("Size","Height +10");
assert('Selected item is 10 pixels taller', fw.selection[0].height, 111);
run_command("Size","Width -1");
assert('Selected item is 1 pixel narrower', fw.selection[0].width, 110);
run_command("Size","Width -10");
assert('Selected item is 10 pixels narrower', fw.selection[0].width, 100);
run_command("Size","Height -1");
assert('Selected item is 1 pixel shorter', fw.selection[0].height, 110);
run_command("Size","Height -10");
assert('Selected item is 10 pixels shorter', fw.selection[0].height, 100);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment