Helios-Workspace-Tests.js 1.9 KB

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