comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: Re: AUnit question
Date: Wed, 20 Sep 2017 20:01:23 +0300
Date: 2017-09-20T20:01:23+03:00	[thread overview]
Message-ID: <opu6t2$12cn$1@gioia.aioe.org> (raw)
In-Reply-To: 9298d1ba-cce4-460c-900a-f84a35c8be2d@googlegroups.com

Stephen Leake wrote:

> On Tuesday, September 19, 2017 at 5:47:38 PM UTC-5, Victor Porton wrote:
>> I need to pass certain directory from command line to AUnit test cases.
>> 
>> So I can create an extension type derived from Test_Suite and store the
>> command line argument into a field in the extension.
> 
> I do this via a discriminant in Test_Case; why do you want to put it in
> Test_Suite?

I want to put it into Test_Suite because otherwise I would need to specify 
over and over again the same parameter for every Test_Case. This makes the 
listing somehow longer.

I decided to make a patch for AUnit which would do the following:

- Create new private tagged type Test_Environment.

- Add "Environment: access Test_Environment'Class := null" parameter to 
Add_Test procedure.

- Add Environment field or discriminant also to Test_Suite. It will be set 
by default (when Environment parameter is null) to a Test_Case when using 
the null Environment for it.

-- 
Victor Porton - http://portonvictor.org

  reply	other threads:[~2017-09-20 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ops6q5$1omp$1@gioia.aioe.org>
2017-09-20 16:17 ` AUnit question Stephen Leake
2017-09-20 17:01   ` Victor Porton [this message]
2017-09-21  7:15     ` Stephen Leake
2014-08-04 11:28 Victor Porton
2014-08-04 15:52 ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox