Project

General

Profile

Support #251

How to add a test for CoCoA-5 (CoCoAInterpreter)

Added by Anna Maria Bigatti over 11 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Manual/documentation
Start date:
02 Oct 2012
Due date:
% Done:

100%

Estimated time:
1.50 h
Spent time:

Description

  1. write a test file foo.cocoa5 in tests/
  2. run it and check if it really does what you want it to do ;-)
  3. add foo.cocoa5 in tests/Makefile (in the list TESTS= ...)
  4. in tests/ run (the first make check will obviously return an error)
      make check
      mv foo.found foo.out
      make check
    

See below for external libs


Related issues

Related to CoCoA-5 - Feature #243: Normaliz tests for CoCoA5Closed2012-09-28

Related to CoCoA-5 - Support #286: How to test (automatically) a user defined CoCoA functionClosed2012-12-11

Related to CoCoA-5 - Feature #500: Interpreter: is it possible to avoid useless prompts?Closed2014-03-28

History

#1 Updated by Anna Maria Bigatti over 11 years ago

For external libraries:
same as above, but the test file has to be called, say for library Foo,
ExtLibFOO.cocoa5

Such test is run only if the variable HAVE_FOO is set to "yes" in autoconf.mk.

If it isn't no test is run, because a different mechanism has to be used to automatically check "errors" in an easy way (still thinking ...)

#2 Updated by Anna Maria Bigatti over 11 years ago

  • Category set to Portability

#3 Updated by Anna Maria Bigatti over 11 years ago

  • Category deleted (Portability)

#4 Updated by Anna Maria Bigatti about 11 years ago

  • Category set to Manual/documentation

#5 Updated by Anna Maria Bigatti almost 10 years ago

  • Target version set to CoCoA-5.1.0 Easter14

#6 Updated by Anna Maria Bigatti almost 10 years ago

  • Estimated time set to 1.50 h

#7 Updated by John Abbott almost 10 years ago

JAA suggests as a general rule: try to avoid designing tests that produce much output (unless the test specifically checks some "output" function).

Why do I think this? Not entirely sure; but I definitely prefer "silent" tests(e.g. TEST_ASSERT(fn(a,b) == c)).

If a test is long, it might be worth printing out a little "progress report" every so often...?

#8 Updated by John Abbott almost 10 years ago

I have recently added a new C5 test (exbugs.cocoa5) and was surprised to find that it produces output. What happened was that the file was read using input redirection rather than being passed to C5 as a comand line argument; this means that every input line produced a prompt.

I suggest passing the file name as a cmd line arg to avoid this; doing so would make exbugs.cocoa5 a "silent" test. This would then require modifying the expected output of all tests.

#9 Updated by John Abbott almost 10 years ago

  • Target version changed from CoCoA-5.1.0 Easter14 to CoCoA-5.1.1 Seoul14

#10 Updated by John Abbott over 9 years ago

  • Target version changed from CoCoA-5.1.1 Seoul14 to CoCoA-5.1.2 summer 2015

#11 Updated by Anna Maria Bigatti over 8 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF