From f1466a46a785457d145ece4253af1c6ab11b81fb Mon Sep 17 00:00:00 2001 From: halw Date: Tue, 10 Feb 2009 21:36:52 +0000 Subject: [PATCH] Author:halw Date:2009-02-10T21:36:52.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@183 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../using-autotest/create-manual-test.wiki | 15 ++++++++++----- .../using-autotest/execute-tests.wiki | 10 ++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/execute-tests.wiki diff --git a/documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/create-manual-test.wiki b/documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/create-manual-test.wiki index ca33c18b..66e01e9e 100644 --- a/documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/create-manual-test.wiki +++ b/documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/create-manual-test.wiki @@ -6,7 +6,7 @@ ==A system to test== -For developing our manual test, let's use a simple system that contains a class modeling bank accounts. Here are two classes that will make up our system. The first, APPLICATION will be the root class of our system. It looks like this: +For developing our manual test, let's use a simple system that contains a class modeling bank accounts. Here are two classes that will make up our system. The first, APPLICATION will be the root class of our system. APPLICATION really only serves to declare an attribute of type BANK_ACCOUNT, which is the class we will write a test against. APPLICATION looks like this: class @@ -23,8 +23,6 @@ feature {NONE} -- Initialization make -- Run application. do - create my_account - my_account.deposit (200) end my_account: BANK_ACCOUNT @@ -46,12 +44,15 @@ inherit feature default_create do - balance := 300 + balance := 0 end balance: INTEGER deposit (an_amount: INTEGER) + -- Deposit `an_amount'. + require + amount_large_enough: an_amount > 0 do ensure balance_increased: balance > old balance @@ -59,6 +60,10 @@ feature end withdraw (an_amount: INTEGER) + -- Withdraw `an_amount'. + require + amount_large_enough: an_amount > 0 + amount_valid: balance >= an_amount do balance := balance - an_amount ensure @@ -71,7 +76,7 @@ invariant end -You shouldn't worry if you've noticed that the class BANK_ACCOUNT has some pretty obvious flaws. We'll deal with those later. +You shouldn't let it worry you if you've noticed that the class BANK_ACCOUNT contains some flaws. We'll deal with these later. If you want to work along with this tutorial, you should be able to copy the text of each these classes from this page and paste it into the EiffelStudio editor pane. Build a system using these two classes. diff --git a/documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/execute-tests.wiki b/documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/execute-tests.wiki new file mode 100644 index 00000000..a58a5072 --- /dev/null +++ b/documentation/current/eiffelstudio/eiffelstudio-guided-tour/using-autotest/execute-tests.wiki @@ -0,0 +1,10 @@ +[[Property:title|Execute tests]] +[[Property:weight|3]] +[[Property:uuid|d0515cb1-0792-3028-2a24-a71b56506959]] +The Eiffel Testing Framework allows you to execute a set of tests. + + +==About Test Results== + + +