comp.lang.ada
 help / color / mirror / Atom feed
* AUnit harness project and directory structure
@ 2013-10-18  9:04 Christoffer Holmstedt
  2013-10-18 11:56 ` Simon Wright
  2013-10-20 15:45 ` Stephen Leake
  0 siblings, 2 replies; 4+ messages in thread
From: Christoffer Holmstedt @ 2013-10-18  9:04 UTC (permalink / raw)


I just started with Ada and AUnit. I really like the rationale behind Ada that you (and others) read the code more than you write code. One thing that I can't understand is the file/directory/project structure of test harnesses.

As an example I'm looking at the very basic "calculator" example that comes with GNAT GPL. harness.gpr is put in the root folder and the actual code that is to be tested is put in the tested_lib/ folder, which is its own project.

When I've used test frameworks in other languages (python/Java) I've been able to completely move all test specific files out from the src/ folder. Is this possible with AUnit?

As an example I would like a structure as follows:

project\
project\src
project\src\PackageA
project\tests
project\tests\testPackageA

Any guidance concerning the AUnit structure and best practice is much appreciated.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AUnit harness project and directory structure
  2013-10-18  9:04 AUnit harness project and directory structure Christoffer Holmstedt
@ 2013-10-18 11:56 ` Simon Wright
  2013-10-20 15:45 ` Stephen Leake
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Wright @ 2013-10-18 11:56 UTC (permalink / raw)


Christoffer Holmstedt <christoffer.holmstedt@gmail.com> writes:

> As an example I'm looking at the very basic "calculator" example that
> comes with GNAT GPL. harness.gpr is put in the root folder and the
> actual code that is to be tested is put in the tested_lib/ folder,
> which is its own project.
>
> When I've used test frameworks in other languages (python/Java) I've
> been able to completely move all test specific files out from the src/
> folder. Is this possible with AUnit?

Certainly. See for example the structure at http://goo.gl/nUyYwY

> Any guidance concerning the AUnit structure and best practice is much
> appreciated.

Not sure about best practice, but this sort of structure seems entirely
natural to me.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AUnit harness project and directory structure
  2013-10-18  9:04 AUnit harness project and directory structure Christoffer Holmstedt
  2013-10-18 11:56 ` Simon Wright
@ 2013-10-20 15:45 ` Stephen Leake
  2013-10-20 16:58   ` Christoffer Holmstedt
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Leake @ 2013-10-20 15:45 UTC (permalink / raw)


Christoffer Holmstedt <christoffer.holmstedt@gmail.com> writes:

> I just started with Ada and AUnit. 

Welcome!

> As an example I would like a structure as follows:
>
> project\
> project\src
> project\src\PackageA
> project\tests
> project\tests\testPackageA

This is determined by the Source_Dirs settings in your project files,
and is certainly possible. Neither Ada nor AUnit make any
assumptions/demands about directory structure.

-- 
-- Stephe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AUnit harness project and directory structure
  2013-10-20 15:45 ` Stephen Leake
@ 2013-10-20 16:58   ` Christoffer Holmstedt
  0 siblings, 0 replies; 4+ messages in thread
From: Christoffer Holmstedt @ 2013-10-20 16:58 UTC (permalink / raw)


Den söndagen den 20:e oktober 2013 kl. 17:45:12 UTC+2 skrev Stephen Leake:
> Christoffer Holmstedt <christoffer.holmstedt@gmail.com> writes:
> 
> 
> 
> > I just started with Ada and AUnit. 
> 
> 
> 
> Welcome!
> 
> 
> 
> > As an example I would like a structure as follows:
> 
> >
> 
> > project\
> 
> > project\src
> 
> > project\src\PackageA
> 
> > project\tests
> 
> > project\tests\testPackageA
> 
> 
> 
> This is determined by the Source_Dirs settings in your project files,
> 
> and is certainly possible. Neither Ada nor AUnit make any
> 
> assumptions/demands about directory structure.
> 
> 
> 
> -- 
> 
> -- Stephe

Thank you Simon and Stephen for the warm welcome. Good to know that the example structure was just a basic example and nothing more. Will dig deeper in the available settings the upcoming week.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-20 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-18  9:04 AUnit harness project and directory structure Christoffer Holmstedt
2013-10-18 11:56 ` Simon Wright
2013-10-20 15:45 ` Stephen Leake
2013-10-20 16:58   ` Christoffer Holmstedt

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