Helios-Workspace-Tests.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. define(["amber/boot", "amber_core/SUnit"], function($boot){"use strict";
  2. if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
  3. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  4. var $pkg = $core.addPackage("Helios-Workspace-Tests");
  5. $pkg.innerEval = function (expr) { return eval(expr); };
  6. $pkg.transport = {"type":"amd","amdNamespace":"helios"};
  7. $core.addClass("HLCodeWidgetTest", $globals.TestCase, [], "Helios-Workspace-Tests");
  8. $core.addMethod(
  9. $core.method({
  10. selector: "testKeyMap",
  11. protocol: "tests",
  12. fn: function (){
  13. var self=this,$self=this;
  14. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  15. return $core.withContext(function($ctx1) {
  16. //>>excludeEnd("ctx");
  17. var $1;
  18. $1=$recv($recv($globals.HLCodeWidget)._pcKeyMap())._isKindOf_($globals.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($globals.HLCodeWidget)._macKeyMap())._isKindOf_($globals.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. });