User Tools

Site Tools


at:tutorial:appendix

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
at:tutorial:appendix [2009/01/29 21:54] – adding elisagat:tutorial:appendix [2010/05/26 19:39] – *fixed tvcutsem
Line 27: Line 27:
 This will execute all ''test*'' methods in the given unit test (in an **undefined** order!), and print out which of the tests succeeded or failed. The ''runTest'' method can optionally take a "reporter" object as an argument, which can be used to implement a custom strategy for reporting success or failure of a unit test. The default reporter object is a text-based UI. This will execute all ''test*'' methods in the given unit test (in an **undefined** order!), and print out which of the tests succeeded or failed. The ''runTest'' method can optionally take a "reporter" object as an argument, which can be used to implement a custom strategy for reporting success or failure of a unit test. The default reporter object is a text-based UI.
  
-Like in JUnit and SUnit, it is possible to define two methods named ''setUp()'' and ''tearDown()'' that are invoked in between //each// individual ''test*'' method. Never rely on the lexical order of your unit test methods for the purposes of initialization, etc.! Unit test methods may be exacuted in an arbitrary order.+Like in JUnit and SUnit, it is possible to define two methods named ''setUp()'' and ''tearDown()'' that are invoked in between //each// individual ''test*'' method. Never rely on the lexical order of your unit test methods for the purposes of initialization, etc.! Unit test methods may be executed in an arbitrary order.
  
 ==== Assertions ==== ==== Assertions ====
Line 472: Line 472:
  
 <note> <note>
-The implementation of leased object references actually consists of two files: ''/.at.lang.leasedrefs'' and ''/at.lang.leasedrefstrait''. leasedrefstrait module implements the common behaviour to the different types of leased references. This module is imported in the leasedrefs module which provides the public API for creating and managing leased object references.+The implementation of leased object references actually consists of two files: ''/.at.lang.leasedrefs'' and ''/at.lang.leasedrefstrait''''leasedrefstrait'' module implements the behaviour common to the different types of leased references. This module is imported in the ''leasedrefs'' module which provides the public API for creating and managing leased object references.
 </note> </note>
  
-The leasedrefs module exports language constructs to create three different types of leased object references:+The ''leasedrefs'' module exports language constructs to create three different types of leased object references:
   * ''lease:for:''returns a leased reference that remains valid for the indicated time interval.   * ''lease:for:''returns a leased reference that remains valid for the indicated time interval.
-  * ''renewOnCallLease:for:'' returns a leased reference that it is automatically renewed each time the remote object receives a message with the specified time interval.+  * ''renewOnCallLease:for:'' returns a leased reference that is automatically renewed (with the specified time interval) each time the remote object receives a message.
   * ''singleCallLease:for:'' returns a leased reference that remains valid for only a single method call on the remote object.   * ''singleCallLease:for:'' returns a leased reference that remains valid for only a single method call on the remote object.
  
-Variations of these constructs are also provided to allow developers to specify the renewal time interval in renew-on-call leased references and the name(s) of the method(s) which expires a single-call leased reference.+Variations of these constructs are also provided to allow developers to specify the renewal time interval in renew-on-call leased references and the name(s) of the method(s) which trigger expiration of a single-call leased reference.
  
-The leasedrefs module also provides the following constructs to explicit manage the lifetime of leased references:+The ''leasedrefs'' module also provides the following constructs to explicitly manage the lifetime of leased references:
  
 <code> <code>
-renew: leasedRef for: interval; +renew: leasedRef for: interval; // renews a lease 
-revoke: leasedRef; +revoke: leasedRef; // revokes a lease 
-timeLeft: leasedRef;+leaseTimeLeft: leasedRef; // return time left until lease expires 
 +when: lease expired: {...}; // trigger a closure when the lease expires
 </code> </code>
  
-''when:expired'' construct is provided to schedule clean-up actions with a leased reference upon its expiration.+The ''when:expired:'' construct is provided to schedule clean-up actions with a leased reference upon its expiration.
  
-Finally, the leasedrefs module exports support primitives to manipulate time intervals (i.e. ''minutes'', ''seconds'', ''millisecs'') so that developers do not need to explicitly import the timer module to use leased references.+Finally, the ''leasedrefs'' module exports support primitives to manipulate time intervals (i.e. ''minutes'', ''seconds'', ''millisecs'') so that developers do not need to explicitly import the timer module to use leased references.
  
  
Line 652: Line 653:
 ==== Object Inspector ==== ==== Object Inspector ====
  
-The module ''/.at.support.inspector'' implements a graphical object inspector. The module requires ''java.awt'' and ''javax.swing'' support from the underlying JVM running AmbientTalk. To inspect an object ''o'', execute:+The module ''/.demo.inspector'' implements a graphical object inspector. The module requires ''java.awt'' and ''javax.swing'' support from the underlying JVM running AmbientTalk. To inspect an object ''o'', execute:
  
 <code> <code>
-import /.at.support.inspector;+import /.demo.inspector;
 inspect(o); inspect(o);
 </code> </code>
at/tutorial/appendix.txt · Last modified: 2021/09/24 10:28 by elisag