1
0

Helios-Workspace-Tests.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. define("helios/Helios-Workspace-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){
  2. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. $core.addPackage('Helios-Workspace-Tests');
  4. $core.packages["Helios-Workspace-Tests"].transport = {"type":"amd","amdNamespace":"helios"};
  5. $core.addClass('HLCodeWidgetTest', $globals.TestCase, [], 'Helios-Workspace-Tests');
  6. $core.addMethod(
  7. $core.method({
  8. selector: "testKeyMap",
  9. protocol: 'tests',
  10. fn: function (){
  11. var self=this;
  12. function $HLCodeWidget(){return $globals.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  13. function $HashedCollection(){return $globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  14. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  15. return $core.withContext(function($ctx1) {
  16. //>>excludeEnd("ctx");
  17. var $1;
  18. $1=$recv($recv($HLCodeWidget())._pcKeyMap())._isKindOf_($HashedCollection());
  19. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  20. $ctx1.sendIdx["isKindOf:"]=1;
  21. //>>excludeEnd("ctx");
  22. self._assert_($1);
  23. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  24. $ctx1.sendIdx["assert:"]=1;
  25. //>>excludeEnd("ctx");
  26. self._assert_($recv($recv($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection()));
  27. return self;
  28. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  29. }, function($ctx1) {$ctx1.fill(self,"testKeyMap",{},$globals.HLCodeWidgetTest)});
  30. //>>excludeEnd("ctx");
  31. },
  32. //>>excludeStart("ide", pragmas.excludeIdeData);
  33. args: [],
  34. source: "testKeyMap\x0a\x09\x22Key maps are a collection of associations.\x22\x0a\x09self assert: (HLCodeWidget pcKeyMap isKindOf: HashedCollection).\x0a\x09self assert: (HLCodeWidget macKeyMap isKindOf: HashedCollection)",
  35. referencedClasses: ["HLCodeWidget", "HashedCollection"],
  36. //>>excludeEnd("ide");
  37. messageSends: ["assert:", "isKindOf:", "pcKeyMap", "macKeyMap"]
  38. }),
  39. $globals.HLCodeWidgetTest);
  40. });