1
0

Helios-Workspace-Tests.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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"].innerEval = function (expr) { return eval(expr); };
  5. $core.packages["Helios-Workspace-Tests"].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;
  13. function $HLCodeWidget(){return $globals.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  14. function $HashedCollection(){return $globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  15. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  16. return $core.withContext(function($ctx1) {
  17. //>>excludeEnd("ctx");
  18. var $1;
  19. $1=$recv($recv($HLCodeWidget())._pcKeyMap())._isKindOf_($HashedCollection());
  20. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  21. $ctx1.sendIdx["isKindOf:"]=1;
  22. //>>excludeEnd("ctx");
  23. self._assert_($1);
  24. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  25. $ctx1.sendIdx["assert:"]=1;
  26. //>>excludeEnd("ctx");
  27. self._assert_($recv($recv($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection()));
  28. return self;
  29. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  30. }, function($ctx1) {$ctx1.fill(self,"testKeyMap",{},$globals.HLCodeWidgetTest)});
  31. //>>excludeEnd("ctx");
  32. },
  33. //>>excludeStart("ide", pragmas.excludeIdeData);
  34. args: [],
  35. 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)",
  36. referencedClasses: ["HLCodeWidget", "HashedCollection"],
  37. //>>excludeEnd("ide");
  38. messageSends: ["assert:", "isKindOf:", "pcKeyMap", "macKeyMap"]
  39. }),
  40. $globals.HLCodeWidgetTest);
  41. });