Helios-Workspace-Tests.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. define(["amber/boot", "require", "amber/core/SUnit"], function($boot,requirejs){"use strict";
  2. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. var $pkg = $core.addPackage("Helios-Workspace-Tests");
  4. $pkg.innerEval = function (expr) { return eval(expr); };
  5. $pkg.transport = {"type":"amd","amdNamespace":"helios"};
  6. $core.addClass("HLCodeWidgetTest", $globals.TestCase, [], "Helios-Workspace-Tests");
  7. $core.addMethod(
  8. $core.method({
  9. selector: "testKeyMap",
  10. protocol: "tests",
  11. fn: function (){
  12. var self=this,$self=this;
  13. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  14. return $core.withContext(function($ctx1) {
  15. //>>excludeEnd("ctx");
  16. var $1;
  17. $1=$recv($recv($globals.HLCodeWidget)._pcKeyMap())._isKindOf_($globals.HashedCollection);
  18. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  19. $ctx1.sendIdx["isKindOf:"]=1;
  20. //>>excludeEnd("ctx");
  21. $self._assert_($1);
  22. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  23. $ctx1.sendIdx["assert:"]=1;
  24. //>>excludeEnd("ctx");
  25. $self._assert_($recv($recv($globals.HLCodeWidget)._macKeyMap())._isKindOf_($globals.HashedCollection));
  26. return self;
  27. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  28. }, function($ctx1) {$ctx1.fill(self,"testKeyMap",{},$globals.HLCodeWidgetTest)});
  29. //>>excludeEnd("ctx");
  30. },
  31. //>>excludeStart("ide", pragmas.excludeIdeData);
  32. args: [],
  33. 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)",
  34. referencedClasses: ["HLCodeWidget", "HashedCollection"],
  35. //>>excludeEnd("ide");
  36. messageSends: ["assert:", "isKindOf:", "pcKeyMap", "macKeyMap"]
  37. }),
  38. $globals.HLCodeWidgetTest);
  39. });