|
Re: Re: workspace on:file: msg#00210lang.smalltalk.squeak.beginners
It is possible but I have an alternative suggestion: put the code that is now in the workspace in methods and test cases, kept on classes. Then you can use file-outs or Monticello packages to have them versioned with the rest of your code. More in detail: The only reason for which I use workspaces is for snippets of code that I need for a couple of hours. Anything which extends that period of time I turn into methods, so that they get saved with the rest of my code. It frequently happens that these methods turn into 'class methods' in a protocol 'examples' (PS: I fo not know how much of a newbie you are -- don't hesitate to tell me that I'm talking chinese here!). For the methods that you use to test things, turn them into unit tests. Testing is a very good ractice (I am glad you do already). By turning the pieces of code into unit tests you (1) will be able to run them all by themself instead of selecting and executing them manually one by one, and (2) you can again save them with the rest of your code. So, if you have some code like the following in your workspace: "Test whether + does what I think it does" 3 + 4 "should give 7" You can: - create a class 'PlusTest', subclass of TestCase. - in class PlusTest, create a protocol called 'testing'. - convert your workspace test in a unit test by putting it in a method whose name starts with 'test' testAddition self assert: (3 + 4 = 7). - open the TestRunner tool - find your class in the list and you can execute your tests. On 18 May 2006, at 12:43, cdrick wrote: maybe I need to precise what I'd like
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: workspace on:file, cdrick |
|---|---|
| Next by Date: | RE: Re: workspace on:file, Ron Teitelbaum |
| Previous by Thread: | Re: workspace on:file, cdrick |
| Next by Thread: | RE: Re: workspace on:file, Ron Teitelbaum |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |