Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Perhaps the library could accept some kind of stream input, so you could pass in a string-like object and avoid all the input files? Or depending on the type of configuration, you could provide "get/setAttribute()" functions to directly, publicy, fiddle the parameters. If that is not really a design goal, then never mind. Data-driven unit tests are frowned upon in some places, but it is definitely better than nothing! I would probably lay out the code like this:</p> <pre><code> project/ src/ tests/ test1/ input/ test2 input/ </code></pre> <p>In each testN directory you would have a cpp file associated to the config files in the input directory.</p> <p>Then, assuming you are using an xUnit-style test library (<a href="http://cppunit.sourceforge.net/" rel="nofollow noreferrer">cppunit</a>, <a href="http://code.google.com/p/googletest/" rel="nofollow noreferrer">googletest</a>, <a href="http://unittest-cpp.sourceforge.net/" rel="nofollow noreferrer">unittest++</a>, or whatever) you can add various testXXX() functions to a single class to test out associated groups of functionality. That way you could cut out part of the lots-of-little-programs problem by grouping at least some tests together.</p> <p>The only problem with this is if the library expects the config file to be called something specific, or to be in a specific place. That shouldn't be the case, but if it is would have to be worked around by copying your test file to the expected location.</p> <p>And don't worry about lots of tests cluttering your project up, if they are tucked away in a tests directory then they won't bother anyone.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload