3

see question in No GNATtest in GNAT Community Edition?

On Windows 10, using GNAT CE 2020, when I build gnattest following the guidance in the ASIS package mentioned in the link, I still get an error when trying to generate a test harness (gnattest -Pgpr-file), gnattest reports: gnat1: invalid switch: -gnatt

Anyone who knows how to proceed ?

Rob
  • 31
  • 1
  • I tried using gnattest, but it's a fundamentally flawed system; it tries to generate skeleton boilerplate code that you then insert stuff into. But you can only generate one test per function, and when you modify your tested functions, the skeleton code is going to be invalidated. It is better to simply write your tests using AUnit; AUnit doesn't require all that boilerplate code in the first place. – TamaMcGlinn Dec 30 '20 at 08:08

1 Answers1

3

-gnatt is the switch that dumps ASIS information, and AdaCore are moving away from ASIS (well, as far as we unsupported users are concerned, have moved).

gnattest is one of the tools supported in libadalang-tools, which depends on libadalang.

Source for both of these is available on the AdaCore Community download page, but since gnattest was only moved from work-in-progress 3 months ago and the latest versions on the download page are dated April 30 I think you’d have to bite the bullet and download from AdaCore’s Github site, and you’d need Python 3.8+ as well.

My only experience of building libadalang and -tools is on macOS, so I don’t think I can help further than that.

Simon Wright
  • 25,108
  • 2
  • 35
  • 62