diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de8c3f..58faef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog * Unreleased +* 1.3.3 (2020-09-15) + * Increase maximum allowed `setTimeout()` from 255 seconds to 65535 seconds + (18.2 hours). (See [Issue + #57](https://github.com/bxparks/AUnit/issues/57)). * 1.3.2 (2020-02-29) * Fix typos in README.md. No functional change. * 1.3.1 (2019-07-31) diff --git a/README.md b/README.md index f02b11d..ad6bb7c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,9 @@ tools to verify, upload and validate the unit tests to the microcontroller, instead of having to go through the Arduino IDE. Both the AUniter and UnixHostDuino tools can be used in a continuous integration system like Jenkins. -Version: 1.3.2 (2020-02-29) +**Version**: 1.3.3 (2020-09-15) + +**Changelog**: [CHANGELOG.md](CHANGELOG.md). [![AUniter Jenkins Badge](https://us-central1-xparks2018.cloudfunctions.net/badge?project=AUnit)](https://github.com/bxparks/AUniter) @@ -1181,10 +1183,14 @@ which accidentally runs forever because the code forgets to call an explicit `pass()`, `fail()` or `skip()`. The `TestRunner` in AUnit applies a time out value to all the test cases that it -runs. The default time out is 10 seconds. Currently, the -time out value is global to all test cases, individual test time out values -cannot be set independently. If a test does not finish before that time, then -the test is marked as `timed out` (internally implemented by the +runs. The default time out is 10 seconds. A timeout value of `0` means an +infinite timeout, which means that the `testing()` test case may run forever. +The value of the timeout is stored as a `uint16_t` type, so the maximum timeout +is 65535 seconds or a bit over 18 hours. + +Currently, the time out value is global to all test cases, individual test time +out values cannot be set independently. If a test does not finish before that +time, then the test is marked as `timed out` (internally implemented by the `Test::expire()` method) and a message is printed like this: ``` Test looping_until timed out. @@ -1201,13 +1207,6 @@ void setup() { } ``` -A timeout value of `0` means an infinite timeout, which means that the -`testing()` test case may run forever. To conserve static memory, the value of -the timeout is stored as a single byte `uint8_t`, so the maximum timeout is 255 -seconds or 4m15s. (It could be argued that a test taking longer than this is not -really a unit test but an integration test, and should probably use a different -framework, but let me know if you truly need a timeout of greater than 4m15s). - ***ArduinoUnit Compatibility***: _Only available in AUnit._ ## GoogleTest Adapter @@ -1216,7 +1215,7 @@ It may be possible to run simple unit tests written using [Google Test](https://github.com/google/googletest/) API on an Arduino platform by using the [aunit/contrib/gtest.h](src/aunit/contrib/gtest.h) adapter. This -adapter layer provides a number of macros Google Test macros which map to +adapter layer provides a number of Google Test macros which map to their equivalent macros in AUnit: * `ASSERT_EQ(e, a)` - `assertEqual()` @@ -1419,7 +1418,7 @@ integer type. ### Testing Private Helper Methods -There is a school of throught which says that unit tests should test only the +There is a school of thought which says that unit tests should test only the publically exposed methods of a class or library. I agree mostly with that sentiment, but not rigidly. I think it is sometimes useful to write unit tests for `protected` or `private` methods. For example, when creating a chain of @@ -1533,10 +1532,6 @@ ESP8266 - ESP-01 (static) | 47356 | compile | 33128 | Not all unit test sketches will experience a savings of 65% of flash memory with AUnit, but a savings of 30-50% seems to be common. -## Changelog - -See [CHANGELOG.md](CHANGELOG.md). - ## System Requirements ### Tool Chain @@ -1592,6 +1587,9 @@ incorporate everything, but I will give your ideas serious consideration. * Created by Brian T. Park (brian@xparks.net). * The Google Test adapter (`gtest.h`) was created by Chris Johnson (chrisjohnsonmail@gmail.com). +* @brewmanz increased the maximum allowed value of `TestRunner::setTimeout()` + from 255 seconds to 65535 seconds (18.2 hours). (See [Issue + #57](https://github.com/bxparks/AUnit/issues/57)). * The design and syntax of many macros (e.g. `test()`, `assertXxx()`) were borrowed from the [ArduinoUnit](https://github.com/mmurdoch/arduinounit) project to allow AUnit to be almost a drop-in replacement. Many thanks to diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..6c998f8 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,5 @@ +html: + doxygen doxygen.cfg > /tmp/doxygen.out + +clean: + rm -rf html diff --git a/docs/doxygen.cfg b/docs/doxygen.cfg index a71ffaa..f58b6a6 100644 --- a/docs/doxygen.cfg +++ b/docs/doxygen.cfg @@ -1,4 +1,4 @@ -# Doxyfile 1.8.13 +# Doxyfile 1.8.17 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -17,11 +17,11 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 @@ -38,7 +38,7 @@ PROJECT_NAME = "AUnit" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.3.2 +PROJECT_NUMBER = 1.3.3 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -93,6 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. @@ -189,6 +197,16 @@ SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus @@ -236,7 +254,12 @@ TAB_SIZE = 4 # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) ALIASES = @@ -274,17 +297,26 @@ OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is +# Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # @@ -295,7 +327,7 @@ EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -307,7 +339,7 @@ MARKDOWN_SUPPORT = YES # to that level are automatically included in the table of contents, even if # they do not have an id attribute. # Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 0. +# Minimum value: 0, maximum value: 99, default value: 5. # This tag requires that the tag MARKDOWN_SUPPORT is set to YES. TOC_INCLUDE_HEADINGS = 0 @@ -337,7 +369,7 @@ BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -443,6 +475,12 @@ EXTRACT_ALL = NO EXTRACT_PRIVATE = NO +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. @@ -497,8 +535,8 @@ HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. +# declarations. If set to NO, these declarations will be included in the +# documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO @@ -521,7 +559,7 @@ INTERNAL_DOCS = NO # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. +# (including Cygwin) ands Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES @@ -708,7 +746,7 @@ LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. @@ -753,7 +791,8 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. # The default value is: NO. WARN_NO_PARAMDOC = NO @@ -795,7 +834,7 @@ INPUT = ../src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of # possible encodings. # The default value is: UTF-8. @@ -812,8 +851,10 @@ INPUT_ENCODING = UTF-8 # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, -# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen +# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. FILE_PATTERNS = *.c \ *.cc \ @@ -1011,7 +1052,7 @@ INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. +# entity all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = NO @@ -1043,12 +1084,12 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # @@ -1076,7 +1117,7 @@ VERBATIM_HEADERS = YES # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. +# generated with the -Duse_libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO @@ -1089,6 +1130,16 @@ CLANG_ASSISTED_PARSING = NO CLANG_OPTIONS = +# If clang assisted parsing is enabled you can provide the clang parser with the +# path to the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files +# were built. This is equivalent to specifying the "-p" option to a clang tool, +# such as clang-check. These options will then be passed to the parser. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. + +CLANG_DATABASE_PATH = + #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -1207,7 +1258,7 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1243,6 +1294,17 @@ HTML_COLORSTYLE_GAMMA = 80 HTML_TIMESTAMP = NO +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. @@ -1266,13 +1328,13 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# environment (see: https://developer.apple.com/xcode/), introduced with OSX +# 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1311,7 +1373,7 @@ DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output @@ -1387,7 +1449,7 @@ QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1395,7 +1457,7 @@ QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1404,7 +1466,7 @@ QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1412,7 +1474,7 @@ QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1420,7 +1482,7 @@ QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = @@ -1513,7 +1575,7 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # @@ -1524,8 +1586,14 @@ FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering +# https://www.mathjax.org) which uses client side JavaScript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1552,8 +1620,8 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest @@ -1595,7 +1663,7 @@ MATHJAX_CODEFILE = SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a web server instead of a web client using Javascript. There +# implemented using a web server instead of a web client using JavaScript. There # are two flavors of web server based searching depending on the EXTERNAL_SEARCH # setting. When disabled, doxygen will generate a PHP script for searching and # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing @@ -1614,7 +1682,7 @@ SERVER_BASED_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1627,7 +1695,7 @@ EXTERNAL_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Xapian (see: https://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1679,21 +1747,35 @@ LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. # -# Note that when enabling USE_PDFLATEX this option is only used for generating -# bitmaps for formulas in the HTML output, but not in the Makefile that is -# written to the output directory. -# The default file is: latex. +# Note that when not enabling USE_PDFLATEX the default is latex when enabling +# USE_PDFLATEX the default is pdflatex and when in the later case latex is +# chosen this is overwritten by pdflatex. For specific output languages the +# default can have been set differently, this depends on the implementation of +# the output language. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate # index for LaTeX. +# Note: This tag is used in the Makefile / make.bat. +# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file +# (.tex). # The default file is: makeindex. # This tag requires that the tag GENERATE_LATEX is set to YES. MAKEINDEX_CMD_NAME = makeindex +# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to +# generate index for LaTeX. In case there is no backslash (\) as first character +# it will be automatically added in the LaTeX code. +# Note: This tag is used in the generated output file (.tex). +# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat. +# The default value is: makeindex. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_MAKEINDEX_CMD = makeindex + # If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. @@ -1814,7 +1896,7 @@ LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1828,6 +1910,14 @@ LATEX_BIB_STYLE = plain LATEX_TIMESTAMP = NO +# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute) +# path from which the emoji images will be read. If a relative path is entered, +# it will be relative to the LATEX_OUTPUT directory. If left blank the +# LATEX_OUTPUT directory will be used. +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EMOJI_DIRECTORY = + #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- @@ -1867,9 +1957,9 @@ COMPACT_RTF = NO RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's config -# file, i.e. a series of assignments. You only have to provide replacements, -# missing definitions are set to their default value. +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# configuration file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. # # See also section "Doxygen usage" for information on how to generate the # default style sheet that doxygen normally uses. @@ -1878,8 +1968,8 @@ RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is -# similar to doxygen's config file. A template extensions file can be generated -# using doxygen -e rtf extensionFile. +# similar to doxygen's configuration file. A template extensions file can be +# generated using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. RTF_EXTENSIONS_FILE = @@ -1965,6 +2055,13 @@ XML_OUTPUT = xml XML_PROGRAMLISTING = YES +# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include +# namespace members in file scope as well, matching the HTML output. +# The default value is: NO. +# This tag requires that the tag GENERATE_XML is set to YES. + +XML_NS_MEMB_FILE_SCOPE = NO + #--------------------------------------------------------------------------- # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- @@ -1997,9 +2094,9 @@ DOCBOOK_PROGRAMLISTING = NO #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sf.net) file that captures the -# structure of the code including all documentation. Note that this feature is -# still experimental and incomplete at the moment. +# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# the structure of the code including all documentation. Note that this feature +# is still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -2166,12 +2263,6 @@ EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- @@ -2185,15 +2276,6 @@ PERL_PATH = /usr/bin/perl CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. diff --git a/docs/html/AUnitVerbose_8h.html b/docs/html/AUnitVerbose_8h.html index f71e7da..b6de170 100644 --- a/docs/html/AUnitVerbose_8h.html +++ b/docs/html/AUnitVerbose_8h.html @@ -1,11 +1,11 @@ - +
- + -Same as AUnit.h except that the verbose versions of the various assertXxx() macros are provided. -More...
#include "aunit/print64.h"
#include "aunit/Verbosity.h"
#include "aunit/Compare.h"
Same as AUnit.h except that the verbose versions of the various assertXxx() macros are provided.
-These capture the strings of the actual arguments in the assert macros and print more verbose and helpful messages in the same format used by ArduinoUnit. The cost is 20-25% increase in flash memory to hold those strings for medium to large unit tests.
+Same as AUnit.h except that the verbose versions of the various assertXxx() macros are provided. These capture the strings of the actual arguments in the assert macros and print more verbose and helpful messages in the same format used by ArduinoUnit. The cost is 20-25% increase in flash memory to hold those strings for medium to large unit tests.
Definition in file AUnitVerbose.h.
Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided. -More...
#include "aunit/print64.h"
#include "aunit/Verbosity.h"
#include "aunit/Compare.h"
Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided.
-These versions print only the values of the parameters given in the assert macros. They do not capture the source text of the assert parameters, which can reduce flash memory by 25-35%.
+Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided. These versions print only the values of the parameters given in the assert macros. They do not capture the source text of the assert parameters, which can reduce flash memory by 25-35%.
Definition in file AUnit.h.
Various assertion macros (assertXxx()) are defined in this header. -More...
Macros | |
#define | assertEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareEqual,"==",arg2) |
Assert that arg1 is equal to arg2. More... | |
+#define | assertEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareEqual,"==",arg2) |
Assert that arg1 is equal to arg2. | |
#define | assertNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2. More... | |
+#define | assertNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2. | |
#define | assertLess(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2. More... | |
+#define | assertLess(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2. | |
#define | assertMore(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2. More... | |
+#define | assertMore(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2. | |
#define | assertLessOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2. More... | |
+#define | assertLessOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2. | |
#define | assertMoreOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2. More... | |
+#define | assertMoreOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2. | |
#define | assertStringCaseEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseEqual,"==",arg2) |
Assert that string arg1 is equal to string arg2, case-insensitive. More... | |
+#define | assertStringCaseEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseEqual,"==",arg2) |
Assert that string arg1 is equal to string arg2, case-insensitive. | |
#define | assertStringCaseNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseNotEqual,"!=",arg2) |
Assert that string arg1 is not equal to string arg2, case-insensitive. More... | |
+#define | assertStringCaseNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseNotEqual,"!=",arg2) |
Assert that string arg1 is not equal to string arg2, case-insensitive. | |
#define | assertTrue(arg) assertBoolInternal(arg,true) |
Assert that arg is true. More... | |
+#define | assertTrue(arg) assertBoolInternal(arg,true) |
Assert that arg is true. | |
#define | assertFalse(arg) assertBoolInternal(arg,false) |
Assert that arg is false. More... | |
+#define | assertFalse(arg) assertBoolInternal(arg,false) |
Assert that arg is false. | |
#define | assertOpInternal(arg1, op, opName, arg2) |
Internal helper macro, shouldn't be called directly by users. More... | |
Internal helper macro, shouldn't be called directly by users. More... | |
#define | assertBoolInternal(arg, value) |
Internal helper macro, shouldn't be called directly by users. More... | |
Internal helper macro, shouldn't be called directly by users. More... | |
#define | assertNear(arg1, arg2, error) |
Assert that arg1 and arg2 are within error of each other. More... | |
Assert that arg1 and arg2 are within error of each other. More... | |
#define | assertNotNear(arg1, arg2, error) |
Assert that arg1 and arg2 are NOT within error of each other. More... | |
Assert that arg1 and arg2 are NOT within error of each other. More... | |
Various assertion macros (assertXxx()) are defined in this header.
-These macros can be used only in a subclass of TestOnce or TestAgain, which is true for all tests created by test(), testing(), testF() and testingF().
+Various assertion macros (assertXxx()) are defined in this header. These macros can be used only in a subclass of TestOnce or TestAgain, which is true for all tests created by test(), testing(), testF() and testingF().
Definition in file AssertMacros.h.
Internal helper macro, shouldn't be called directly by users.
Definition at line 84 of file AssertMacros.h.
-#define assertEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareEqual,"==",arg2) | -
Assert that arg1 is equal to arg2.
- -Definition at line 40 of file AssertMacros.h.
- -#define assertFalse | -( | -- | arg | ) | -assertBoolInternal(arg,false) | -
Assert that arg is false.
- -Definition at line 75 of file AssertMacros.h.
- -#define assertLess | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareLess,"<",arg2) | -
Assert that arg1 is less than arg2.
- -Definition at line 48 of file AssertMacros.h.
- -#define assertLessOrEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) | -
Assert that arg1 is less than or equal to arg2.
- -Definition at line 56 of file AssertMacros.h.
- -#define assertMore | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareMore,">",arg2) | -
Assert that arg1 is more than arg2.
- -Definition at line 52 of file AssertMacros.h.
- -#define assertMoreOrEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) | -
Assert that arg1 is more than or equal to arg2.
- -Definition at line 60 of file AssertMacros.h.
-Assert that arg1 and arg2 are within error of each other.
Definition at line 90 of file AssertMacros.h.
- - - -#define assertNotEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) | -
Assert that arg1 is not equal to arg2.
- -Definition at line 44 of file AssertMacros.h.
-Assert that arg1 and arg2 are NOT within error of each other.
Definition at line 97 of file AssertMacros.h.
@@ -494,97 +304,15 @@Internal helper macro, shouldn't be called directly by users.
Definition at line 78 of file AssertMacros.h.
- - - -#define assertStringCaseEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareStringCaseEqual,"==",arg2) | -
Assert that string arg1 is equal to string arg2, case-insensitive.
- -Definition at line 64 of file AssertMacros.h.
- -#define assertStringCaseNotEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpInternal(arg1,aunit::internal::compareStringCaseNotEqual,"!=",arg2) | -
Assert that string arg1 is not equal to string arg2, case-insensitive.
- -Definition at line 68 of file AssertMacros.h.
- -#define assertTrue | -( | -- | arg | ) | -assertBoolInternal(arg,true) | -
Assert that arg is true.
- -Definition at line 72 of file AssertMacros.h.
-Verbose versions of the macros in AssertMacros.h. -More...
Macros | |
#define | assertEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareEqual,"==",arg2) |
Assert that arg1 is equal to arg2. More... | |
+#define | assertEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareEqual,"==",arg2) |
Assert that arg1 is equal to arg2. | |
#define | assertNotEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2. More... | |
+#define | assertNotEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2. | |
#define | assertLess(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2. More... | |
+#define | assertLess(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2. | |
#define | assertMore(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2. More... | |
+#define | assertMore(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2. | |
#define | assertLessOrEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2. More... | |
+#define | assertLessOrEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2. | |
#define | assertMoreOrEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2. More... | |
+#define | assertMoreOrEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2. | |
#define | assertStringCaseEqual(arg1, arg2) |
Assert that string arg1 is equal to string arg2, case-insensitive. More... | |
Assert that string arg1 is equal to string arg2, case-insensitive. More... | |
#define | assertStringCaseNotEqual(arg1, arg2) |
Assert that string arg1 is not equal to string arg2, case-insensitive. More... | |
Assert that string arg1 is not equal to string arg2, case-insensitive. More... | |
#define | assertTrue(arg) assertBoolVerboseInternal(arg,true) |
Assert that arg is true. More... | |
+#define | assertTrue(arg) assertBoolVerboseInternal(arg,true) |
Assert that arg is true. | |
#define | assertFalse(arg) assertBoolVerboseInternal(arg,false) |
Assert that arg is false. More... | |
+#define | assertFalse(arg) assertBoolVerboseInternal(arg,false) |
Assert that arg is false. | |
#define | assertOpVerboseInternal(arg1, op, opName, arg2) |
Internal helper macro, shouldn't be called directly by users. More... | |
Internal helper macro, shouldn't be called directly by users. More... | |
#define | assertBoolVerboseInternal(arg, value) |
Internal helper macro, shouldn't be called directly by users. More... | |
Internal helper macro, shouldn't be called directly by users. More... | |
#define | assertNear(arg1, arg2, error) |
Assert that arg1 and arg2 are within error of each other. More... | |
Assert that arg1 and arg2 are within error of each other. More... | |
#define | assertNotNear(arg1, arg2, error) |
Assert that arg1 and arg2 are NOT within error of each other. More... | |
Assert that arg1 and arg2 are NOT within error of each other. More... | |
Verbose versions of the macros in AssertMacros.h.
-These capture the string of the actual arguments and pass them to the respective assertionVerbose() methods so that verbose messages can be printed.
+Verbose versions of the macros in AssertMacros.h. These capture the string of the actual arguments and pass them to the respective assertionVerbose() methods so that verbose messages can be printed.
Definition in file AssertVerboseMacros.h.
Internal helper macro, shouldn't be called directly by users.
Definition at line 87 of file AssertVerboseMacros.h.
-#define assertEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpVerboseInternal(arg1,aunit::internal::compareEqual,"==",arg2) | -
Assert that arg1 is equal to arg2.
- -Definition at line 40 of file AssertVerboseMacros.h.
- -#define assertFalse | -( | -- | arg | ) | -assertBoolVerboseInternal(arg,false) | -
Assert that arg is false.
- -Definition at line 77 of file AssertVerboseMacros.h.
- -#define assertLess | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpVerboseInternal(arg1,aunit::internal::compareLess,"<",arg2) | -
Assert that arg1 is less than arg2.
- -Definition at line 48 of file AssertVerboseMacros.h.
- -#define assertLessOrEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpVerboseInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) | -
Assert that arg1 is less than or equal to arg2.
- -Definition at line 56 of file AssertVerboseMacros.h.
- -#define assertMore | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpVerboseInternal(arg1,aunit::internal::compareMore,">",arg2) | -
Assert that arg1 is more than arg2.
- -Definition at line 52 of file AssertVerboseMacros.h.
- -#define assertMoreOrEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpVerboseInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) | -
Assert that arg1 is more than or equal to arg2.
- -Definition at line 60 of file AssertVerboseMacros.h.
-Assert that arg1 and arg2 are within error of each other.
Definition at line 93 of file AssertVerboseMacros.h.
- - - -#define assertNotEqual | -( | -- | arg1, | -
- | - | - | arg2 | -
- | ) | -assertOpVerboseInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) | -
Assert that arg1 is not equal to arg2.
- -Definition at line 44 of file AssertVerboseMacros.h.
-Assert that arg1 and arg2 are NOT within error of each other.
Definition at line 101 of file AssertVerboseMacros.h.
@@ -494,7 +304,12 @@Internal helper macro, shouldn't be called directly by users.
Definition at line 80 of file AssertVerboseMacros.h.
@@ -526,7 +341,8 @@Assert that string arg1 is equal to string arg2, case-insensitive.
@@ -559,42 +375,22 @@Assert that string arg1 is not equal to string arg2, case-insensitive.
Definition at line 69 of file AssertVerboseMacros.h.
-#define assertTrue | -( | -- | arg | ) | -assertBoolVerboseInternal(arg,true) | -
Assert that arg is true.
- -Definition at line 74 of file AssertVerboseMacros.h.
-This file provides overloaded compareXxx(a, b) functions which are used by the various assertXxx(a, b) macros. -More...
#include <stddef.h>
This file provides overloaded compareXxx(a, b) functions which are used by the various assertXxx(a, b) macros.
-We wanted to allow users to use the assertXxx() macros with all combinations of the 3 types of strings available in the Arduino platform:
+This file provides overloaded compareXxx(a, b) functions which are used by the various assertXxx(a, b) macros. We wanted to allow users to use the assertXxx() macros with all combinations of the 3 types of strings available in the Arduino platform:
All versions of compareString() and compareStringN() accept nullptr arguments (in constrast to strcmp() and strncmp() where their behavior for nullptr are undefined by the C standard.) If both arguments are nullptr, then the strings are considered equal (returns 0). Otherwise, the nullptr is arbitrarily defined to be less than all non-null strings, including the empty string.
Definition in file Compare.h.
-int aunit::internal::compareStringN | -( | -const char * | -a, | -
- | - | const char * | -b, | -
- | - | size_t | -n | -
- | ) | -- |
Compare only the first n characters of 'a' or 'b'.
- -Definition at line 269 of file Compare.cpp.
- -int aunit::internal::compareStringN | -( | -const char * | -a, | -
- | - | const __FlashStringHelper * | -b, | -
- | - | size_t | -n | -
- | ) | -- |
Compare only the first n characters of 'a' or 'b'.
- -Definition at line 276 of file Compare.cpp.
- -int aunit::internal::compareStringN | -( | -const __FlashStringHelper * | -a, | -
- | - | const char * | -b, | -
- | - | size_t | -n | -
- | ) | -- |
Compare only the first n characters of 'a' or 'b'.
- -Definition at line 283 of file Compare.cpp.
- -int aunit::internal::compareStringN | -( | -const __FlashStringHelper * | -a, | -
- | - | const __FlashStringHelper * | -b, | -
- | - | size_t | -n | -
- | ) | -- |
Compare only the first n characters of 'a' or 'b'.
- -Definition at line 290 of file Compare.cpp.
- -Various macros to smooth over the differences among the various platforms with regards to their support for flash strings and the various macros used to create and access them. -More...
Various macros to smooth over the differences among the various platforms with regards to their support for flash strings and the various macros used to create and access them.
+Various macros to smooth over the differences among the various platforms with regards to their support for flash strings and the various macros used to create and access them.
On AVR, flash strings are fully supported through the F() and PSTR() macros, and the (const __FlashStringHelper*) pointer. However, the useful FPSTR() macro is not defined.
On Teensy-ARM, flash strings are not supported, but F(), PSTR() and (const __FlashStringHelper*) are defined. The useful FPSTR() macro is not defined.
-On the ESP8266 platform, flash strings are implemented, and the F(), PSTR() and __FlashStringHelper are defined, but the implementation is brittle and can fail with obscure errors messages. For a single compilation unit, a flash string cannot be defined in both an inline and non-inline contexts (see https://github.com/esp8266/Arduino/issues/3369). In some cases (e.g. TestMacros.h), we were able to move the F() macro into a non-inline context. But in other cases (e.g. AssertVerboseMacros.h), the end-user can choose to use an assertXxx() macro inside an inline function, which breaks the compiler. Therefore, I chose to use normal (const char*) strings instead of flash strings in those assertXxx() macros. In addition, the ESP8266 platform defines a useful FPSTR() macro which converts a (const char*) returned by PSTR() into a (const __FlashStringHelper*) pointer.
+On the ESP8266 platform, flash strings are implemented, and the F(), PSTR() and __FlashStringHelper are defined, but the implementation is brittle and can fail with obscure errors messages. For a single compilation unit, a flash string cannot be defined in both an inline and non-inline contexts (see https://github.com/esp8266/Arduino/issues/3369). In some cases (e.g. TestMacros.h), we were able to move the F() macro into a non-inline context. But in other cases (e.g. AssertVerboseMacros.h), the end-user can choose to use an assertXxx() macro inside an inline function, which breaks the compiler. Therefore, I chose to use normal (const char*) strings instead of flash strings in those assertXxx() macros. In addition, the ESP8266 platform defines a useful FPSTR() macro which converts a (const char*) returned by PSTR() into a (const __FlashStringHelper*) pointer.
On the ESP32, flash strings are not implemented, but the various F(), PSTR() and __FlashStringHelper symbols are defined for compatibility, similar to Teensy-ARM. However, the implementation of FPSTR() is incorrect, see https://github.com/espressif/arduino-esp32/issues/1371. That macro should return a (const __FlashStringHelper*) pointer, but is defined to return a (const char*) pointer.
To make AUnit work under all of the above platforms, I chose to support flash strings only on the AVR. I create custom versions of the F() and FPSTR() macros below to accomplish this.
@@ -142,7 +143,7 @@Various assertTestXxx(), checkTestXxx(), assertTestXxxF() and checkTestXxxF() macros are defined in this header. -More...
#include "Flash.h"
Assert that test 'name' is done.
Definition at line 127 of file MetaAssertMacros.h.
- - - -#define assertTestDoneF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isDone, kMessageDone) | -
Assert that test 'name' is done.
- -Definition at line 288 of file MetaAssertMacros.h.
-Assert that test 'name' has timed out.
Definition at line 207 of file MetaAssertMacros.h.
- - - -#define assertTestExpireF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isExpired, kMessageExpired) | -
Assert that test 'name' has timed out.
- -Definition at line 321 of file MetaAssertMacros.h.
-Assert that test 'name' has failed.
Definition at line 167 of file MetaAssertMacros.h.
- - - -#define assertTestFailF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isFailed, kMessageFailed) | -
Assert that test 'name' has failed.
- -Definition at line 304 of file MetaAssertMacros.h.
-Assert that test 'name' is not done.
Definition at line 137 of file MetaAssertMacros.h.
- - - -#define assertTestNotDoneF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isNotDone, kMessageNotDone) | -
Assert that test 'name' is not done.
- -Definition at line 292 of file MetaAssertMacros.h.
-Assert that test 'name' has not timed out.
Definition at line 217 of file MetaAssertMacros.h.
@@ -685,7 +587,8 @@Assert that test 'name' has not timed out.
@@ -708,43 +611,13 @@Assert that test 'name' has not failed.
Definition at line 177 of file MetaAssertMacros.h.
-#define assertTestNotFailF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isNotFailed, kMessageNotFailed) | -
Assert that test 'name' has not failed.
- -Definition at line 308 of file MetaAssertMacros.h.
-Assert that test 'name' has not passed.
Definition at line 157 of file MetaAssertMacros.h.
- - - -#define assertTestNotPassF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isNotPassed, kMessageNotPassed) | -
Assert that test 'name' has not passed.
- -Definition at line 300 of file MetaAssertMacros.h.
-Assert that test 'name' has not been skipped.
Definition at line 197 of file MetaAssertMacros.h.
@@ -848,7 +693,8 @@Assert that test 'name' has not been skipped.
@@ -871,43 +717,13 @@Assert that test 'name' has passed.
Definition at line 147 of file MetaAssertMacros.h.
-#define assertTestPassF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isPassed, kMessagePassed) | -
Assert that test 'name' has passed.
- -Definition at line 296 of file MetaAssertMacros.h.
-Assert that test 'name' has been skipped.
Definition at line 187 of file MetaAssertMacros.h.
- - - -#define assertTestSkipF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -assertTestStatusInternalF(testClass, name, isSkipped, kMessageSkipped) | -
Assert that test 'name' has been skipped.
- -Definition at line 312 of file MetaAssertMacros.h.
-Internal helper macro, shouldn't be called directly by users.
@@ -1040,7 +831,12 @@Definition at line 234 of file MetaAssertMacros.h.
@@ -1083,7 +879,11 @@Internal helper macro, shouldn't be called directly by users.
@@ -1106,43 +906,13 @@Return true if test 'name' is done.
Definition at line 44 of file MetaAssertMacros.h.
-#define checkTestDoneF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isDone()) | -
Return true if test 'name' is done.
- -Definition at line 245 of file MetaAssertMacros.h.
-Return true if test 'name' has timed out.
Definition at line 108 of file MetaAssertMacros.h.
-#define checkTestExpireF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isExpired()) | -
Return true if test 'name' has timed out.
- -Definition at line 277 of file MetaAssertMacros.h.
-Return true if test 'name' has failed.
Definition at line 76 of file MetaAssertMacros.h.
- - - -#define checkTestFailF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isFailed()) | -
Return true if test 'name' has failed.
- -Definition at line 261 of file MetaAssertMacros.h.
-Return true if test 'name' is not done.
Definition at line 52 of file MetaAssertMacros.h.
- - - -#define checkTestNotDoneF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isNotDone()) | -
Return true if test 'name' is not done.
- -Definition at line 249 of file MetaAssertMacros.h.
-Return true if test 'name' has not timed out.
Definition at line 116 of file MetaAssertMacros.h.
- - - -#define checkTestNotExpireF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isNotExpired()) | -
Return true if test 'name' has not timed out.
- -Definition at line 281 of file MetaAssertMacros.h.
-Return true if test 'name' has not failed.
Definition at line 84 of file MetaAssertMacros.h.
- - - -#define checkTestNotFailF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isNotFailed()) | -
Return true if test 'name' has not failed.
- -Definition at line 265 of file MetaAssertMacros.h.
-Return true if test 'name' has not passed.
Definition at line 68 of file MetaAssertMacros.h.
- - - -#define checkTestNotPassF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isNotPassed()) | -
Return true if test 'name' has not passed.
- -Definition at line 257 of file MetaAssertMacros.h.
-Return true if test 'name' has not been skipped.
Definition at line 100 of file MetaAssertMacros.h.
- - - -#define checkTestNotSkipF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isNotSkipped()) | -
Return true if test 'name' has not been skipped.
- -Definition at line 273 of file MetaAssertMacros.h.
-Return true if test 'name' has passed.
Definition at line 60 of file MetaAssertMacros.h.
- - - -#define checkTestPassF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isPassed()) | -
Return true if test 'name' has passed.
- -Definition at line 253 of file MetaAssertMacros.h.
-Return true if test 'name' has been skipped.
Definition at line 92 of file MetaAssertMacros.h.
- - - -#define checkTestSkipF | -( | -- | testClass, | -
- | - | - | name | -
- | ) | -(testClass##_##name##_instance.isSkipped()) | -
Return true if test 'name' has been skipped.
- -Definition at line 269 of file MetaAssertMacros.h.
-Expire the current test, print a status message, and return immediately.
Similar to Test::expire() except that this prints a status message.
@@ -1668,7 +1172,10 @@Fail the current test, return immediately, and print a status message.
Similar to Test::fail() except that this prints a status message.
@@ -1691,7 +1198,10 @@Pass the current test, print a status message, and return immediately.
Similar to Test::pass() except that this prints a status message.
@@ -1714,7 +1224,11 @@Skip the current test, print a status message, and return immediately.
Similar to Test::skip() except that this prints a status message.
@@ -1724,11 +1238,13 @@
- AUnit
- 1.3.2
-
- Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
- |
-
Various macros (test(), testF(), testing(), testingF(), externTest(), externTestF(), externTesting(), externTestingF()) are defined in this header. -More...
Various macros (test(), testF(), testing(), testingF(), externTest(), externTestF(), externTesting(), externTestingF()) are defined in this header.
+Various macros (test(), testF(), testing(), testingF(), externTest(), externTestF(), externTesting(), externTestingF()) are defined in this header.
Definition in file TestMacros.h.
Definition at line 139 of file TestMacros.h.
@@ -214,8 +223,12 @@Definition at line 147 of file TestMacros.h.
@@ -236,8 +249,12 @@Definition at line 169 of file TestMacros.h.
@@ -268,8 +285,12 @@Definition at line 177 of file TestMacros.h.
@@ -291,9 +312,9 @@Create an extern reference to a test() test case object defined elsewhere.
+Create an extern reference to a test() test case object defined elsewhere.
This is only necessary if you use assertTestXxx() or checkTestXxx() when the test is in another file (or defined after the assertion on it).
-Two versions are supported: externTest(name) and externTest(suiteName, name). The 2-argument externTest(suiteName, name) is a convenience macro which is identical to externTest(suiteName_name).
+Two versions are supported: externTest(name) and externTest(suiteName, name). The 2-argument externTest(suiteName, name) is a convenience macro which is identical to externTest(suiteName_name).
Definition at line 134 of file TestMacros.h.
@@ -324,8 +345,14 @@Create an extern reference to a testF() test case object defined elsewhere.
+Value:Create an extern reference to a testF() test case object defined elsewhere.
This is only necessary if you use assertTestXxx() or checkTestXxx() when the test is in another file (or defined after the assertion on it).
Definition at line 225 of file TestMacros.h.
@@ -348,9 +375,9 @@Create an extern reference to a testing() test case object defined elsewhere.
+Create an extern reference to a testing() test case object defined elsewhere.
This is only necessary if you use assertTestXxx() or checkTestXxx() when the test is in another file (or defined after the assertion on it).
-Two versions are supported: externTesting(name) and externTesting(suiteName, name).
+Two versions are supported: externTesting(name) and externTesting(suiteName, name).
Definition at line 164 of file TestMacros.h.
@@ -381,8 +408,14 @@Create an extern reference to a testingF() test case object defined elsewhere.
+Value:Create an extern reference to a testingF() test case object defined elsewhere.
This is only necessary if you use assertTestXxx() or checkTestXxx() when the test is in another file (or defined after the assertion on it).
Definition at line 239 of file TestMacros.h.
@@ -406,7 +439,7 @@Macro to define a test that will be run only once.
-Two versions are supported: test(name) and test(suiteName, name). The 2-argument test(suiteName, name) is a convenience macro which is identical to test(suiteName_name).
+Two versions are supported: test(name) and test(suiteName, name). The 2-argument test(suiteName, name) is a convenience macro which is identical to test(suiteName_name).
Definition at line 62 of file TestMacros.h.
@@ -427,8 +460,15 @@Definition at line 67 of file TestMacros.h.
@@ -459,8 +499,15 @@Definition at line 78 of file TestMacros.h.
@@ -491,7 +538,16 @@Create a test that is derived from a custom TestOnce class.
The name of the instance is prefixed by '{testClass}_' to avoid name collisions with similarly named tests using other fixtures.
@@ -516,7 +572,7 @@Macro to define a test that will run repeatly upon each iteration of the global loop() method, stopping when the something calls Test::pass(), Test::fail() or Test::skip().
-Two versions are supported: testing(name) and testing(suiteName, name). The 2-argument testing(suiteName, name) is a convenience macro which is identical to testing(suiteName_name).
+Two versions are supported: testing(name) and testing(suiteName, name). The 2-argument testing(suiteName, name) is a convenience macro which is identical to testing(suiteName_name).
Definition at line 98 of file TestMacros.h.
@@ -537,8 +593,15 @@Definition at line 103 of file TestMacros.h.
@@ -569,8 +632,15 @@Definition at line 114 of file TestMacros.h.
@@ -601,21 +671,34 @@Create a test that is derived from a custom TestAgain class.
The name of the instance is prefixed by '{testClass}_' to avoid name collisions with similarly named tests using other fixtures.
-Note that test(suiteName, name) is different than testF(className, name), but there will be a name collision if suiteName is the same as className.
+Note that test(suiteName, name) is different than testF(className, name), but there will be a name collision if suiteName is the same as className.
Definition at line 209 of file TestMacros.h.
An Assertion class is a subclass of Test and provides various overloaded assertion() functions. +
An Assertion class is a subclass of Test and provides various overloaded assertion() functions. More...
#include <Assertion.h>
Protected Member Functions | |
Assertion () | |
Empty constructor. More... | |
+ | Assertion () |
Empty constructor. | |
bool | isOutputEnabled (bool ok) const |
Returns true if an assertion message should be printed. More... | |
+bool | isOutputEnabled (bool ok) const |
Returns true if an assertion message should be printed. | |
bool | assertionBool (const char *file, uint16_t line, bool arg, bool value) |
void | init (const __FlashStringHelper *name) |
bool | isVerbosity (uint8_t verbosity) const |
Determine if any of the given verbosity is enabled. More... | |
+bool | isVerbosity (uint8_t verbosity) const |
Determine if any of the given verbosity is enabled. | |
uint8_t | getVerbosity () const |
Get the verbosity. More... | |
+uint8_t | getVerbosity () const |
Get the verbosity. | |
@@ -283,59 +292,73 @@
virtual void | loop ()=0 | | The user-provided test case function. More... | | Print out the summary of the current test. | | Get the name of the test. | | Get the life cycle state of the test. | |
void | setLifeCycle (uint8_t state) | | Get the status of the test. | | void | setStatus (uint8_t status) | | Set the status of the test. More... | | Set the status to Passed or Failed depending on ok. | | | Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | | bool | isDone () const | | Return true if test has been asserted. More... | | Return true if test is not has been asserted. | | Return true if test is passed. | | Return true if test is not passed. | | Return true if test is failed. | | Return true if test is not failed. | | Return true if test is skipped. | | Return true if test is not skipped. | | Return true if test is expired. | | Return true if test is not expired. | | void | skip () | void | expire () | | Mark the test as expired (i.e. More... | | Enable the given verbosity of the current test. | | Disable the given verbosity of the current test. | | Static Public Member Functions inherited from aunit::Test | static Test ** | getRoot () | | Get the pointer to the root pointer. More... | | | Test is new, needs to be setup. | | | Test is Excluded by an exclude() method. More... | | | Test has been set up by calling setup() and ready to execute the test code. More... | | | Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined. More... | | static const uint8_t | kLifeCycleFinished = 4 | | The test has completed its life cycle. More... | | Test status is unknown. | | Test has passed, or pass() was called. | | Test has failed, or fail() was called. | | Test is skipped through the exclude() method or skip() was called. | | Test has timed out, or expire() called. | | |
An Assertion class is a subclass of Test and provides various overloaded assertion() functions.
-Having this class inherit from Test allows it to have access to the mVerbosity setting, as well as the test's current mStatus. (An earlier implementation inverted the class hierarchy between Assertion and Test). That allows every assertion() method to bail out early if it detects the result of a previous assertion() in mStatus. This delayed bailout may happen if the assertXxx() macro was called from inside a helper method of a fixture class used by testF() or testingF() macros.
+An Assertion class is a subclass of Test and provides various overloaded assertion() functions.
+Having this class inherit from Test allows it to have access to the mVerbosity setting, as well as the test's current mStatus. (An earlier implementation inverted the class hierarchy between Assertion and Test). That allows every assertion() method to bail out early if it detects the result of a previous assertion() in mStatus. This delayed bailout may happen if the assertXxx() macro was called from inside a helper method of a fixture class used by testF() or testingF() macros.
For the same reason as the compareXxx() methods, we use explicit overloaded functions, instead of using template specialization. And just as before, I was unable to use a template function for primitive integer types, because it interfered with the resolution of assertion(char*, char*). The wrong function would be called.
The assertion() methods are internal helpers, they should not be called directly by users.
Definition at line 55 of file Assertion.h.
-
-
|
- -inlineprotected | -
Empty constructor.
- -Definition at line 58 of file Assertion.h.
- -
-
|
- -protected | -
Returns true if an assertion message should be printed.
- -Definition at line 183 of file Assertion.cpp.
- -Class that extends the Assertion class to support the checkTestXxx() and assertTestXxx() macros that look at the status of the named test. +
Class that extends the Assertion class to support the checkTestXxx() and assertTestXxx() macros that look at the status of the named test. More...
#include <MetaAssertion.h>
Protected Member Functions | |
MetaAssertion () | |
Empty constructor. More... | |
+ | MetaAssertion () |
Empty constructor. | |
bool | assertionTestStatus (const char *file, uint16_t line, const char *testName, const __FlashStringHelper *statusMessage, bool ok) |
Set the status of the current test using the 'ok' status from another test, and print the assertion message if requested. | |
bool | isOutputEnabledForStatus (uint8_t status) const |
Return true if setting of status should print a message. More... | |
+bool | isOutputEnabledForStatus (uint8_t status) const |
Return true if setting of status should print a message. | |
void | setStatusNow (const char *file, uint16_t line, uint8_t status, const __FlashStringHelper *statusString) |
Set the status of the current test to 'status' and print a message. More... | |
+void | setStatusNow (const char *file, uint16_t line, uint8_t status, const __FlashStringHelper *statusString) |
Set the status of the current test to 'status' and print a message. | |
Protected Member Functions inherited from aunit::Assertion | |
Assertion () | |
Empty constructor. More... | |
+ | Assertion () |
Empty constructor. | |
bool | isOutputEnabled (bool ok) const |
Returns true if an assertion message should be printed. More... | |
+bool | isOutputEnabled (bool ok) const |
Returns true if an assertion message should be printed. | |
bool | assertionBool (const char *file, uint16_t line, bool arg, bool value) |
void | init (const __FlashStringHelper *name) |
bool | isVerbosity (uint8_t verbosity) const |
Determine if any of the given verbosity is enabled. More... | |
+bool | isVerbosity (uint8_t verbosity) const |
Determine if any of the given verbosity is enabled. | |
uint8_t | getVerbosity () const |
Get the verbosity. More... | |
+uint8_t | getVerbosity () const |
Get the verbosity. | |
@@ -332,59 +344,73 @@
virtual void | loop ()=0 | | The user-provided test case function. More... | | Print out the summary of the current test. | | Get the name of the test. | | Get the life cycle state of the test. | |
void | setLifeCycle (uint8_t state) | | Get the status of the test. | | void | setStatus (uint8_t status) | | Set the status of the test. More... | | Set the status to Passed or Failed depending on ok. | | | Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | | bool | isDone () const | | Return true if test has been asserted. More... | | Return true if test is not has been asserted. | | Return true if test is passed. | | Return true if test is not passed. | | Return true if test is failed. | | Return true if test is not failed. | | Return true if test is skipped. | | Return true if test is not skipped. | | Return true if test is expired. | | Return true if test is not expired. | | void | skip () | void | expire () | | Mark the test as expired (i.e. More... | | Enable the given verbosity of the current test. | | Disable the given verbosity of the current test. | | Static Public Member Functions inherited from aunit::Test | static Test ** | getRoot () | | Get the pointer to the root pointer. More... | | | Test is new, needs to be setup. | | | Test is Excluded by an exclude() method. More... | | | Test has been set up by calling setup() and ready to execute the test code. More... | | | Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined. More... | | static const uint8_t | kLifeCycleFinished = 4 | | The test has completed its life cycle. More... | | Test status is unknown. | | Test has passed, or pass() was called. | | Test has failed, or fail() was called. | | Test is skipped through the exclude() method or skip() was called. | | Test has timed out, or expire() called. | | |
Class that extends the Assertion class to support the checkTestXxx() and assertTestXxx() macros that look at the status of the named test.
+Class that extends the Assertion class to support the checkTestXxx() and assertTestXxx() macros that look at the status of the named test.
Definition at line 42 of file MetaAssertion.h.
-
-
|
- -inlineprotected | -
Empty constructor.
- -Definition at line 59 of file MetaAssertion.h.
- -
-
|
- -protected | -
Return true if setting of status should print a message.
- -Definition at line 103 of file MetaAssertion.cpp.
- -
-
|
- -protected | -
Set the status of the current test to 'status' and print a message.
- -Definition at line 110 of file MetaAssertion.cpp.
- -Utility class that provides a level of indirection to the Print class where test results can be sent.
-By default, the Print object will be the Serial object. This can be changed using the setPrinter() method.
+By default, the Print object will be the Serial object. This can be changed using the setPrinter() method.
This class assumes that it will be used after all static initializations have finished. Because static initialization ordering is undefined, if this utility is used during static initialization, the behaviour is undefined.
Definition at line 41 of file Printer.h.
@@ -116,53 +120,23 @@Get the output printer used by the various assertion() methods and the TestRunner.
-The default is the predefined Serial object. Can be changed using the setPrinter() method.
+Get the output printer used by the various assertion() methods and the TestRunner.
+The default is the predefined Serial object. Can be changed using the setPrinter() method.
-
-
|
- -inlinestatic | -
Public Member Functions | |
Test () | |
Empty constructor. More... | |
Empty constructor. More... | |
virtual void | setup () |
Optional method that performs any initialization. More... | |
Optional method that performs any initialization. More... | |
virtual void | teardown () |
Optional method that performs any clean up after the test ends for any reasons, either passing or otherwise. More... | |
Optional method that performs any clean up after the test ends for any reasons, either passing or otherwise. More... | |
virtual void | loop ()=0 |
The user-provided test case function. More... | |
The user-provided test case function. More... | |
void | resolve () |
Print out the summary of the current test. More... | |
+void | resolve () |
Print out the summary of the current test. | |
const internal::FCString & | getName () const |
Get the name of the test. More... | |
+const internal::FCString & | getName () const |
Get the name of the test. | |
uint8_t | getLifeCycle () const |
Get the life cycle state of the test. More... | |
+uint8_t | getLifeCycle () const |
Get the life cycle state of the test. | |
void | setLifeCycle (uint8_t state) |
uint8_t | getStatus () const |
Get the status of the test. More... | |
+uint8_t | getStatus () const |
Get the status of the test. | |
void | setStatus (uint8_t status) |
Set the status of the test. More... | |
Set the status of the test. More... | |
void | setPassOrFail (bool ok) |
Set the status to Passed or Failed depending on ok. More... | |
+void | setPassOrFail (bool ok) |
Set the status to Passed or Failed depending on ok. | |
Test ** | getNext () |
Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | |
Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | |
bool | isDone () const |
Return true if test has been asserted. More... | |
Return true if test has been asserted. More... | |
bool | isNotDone () const |
Return true if test is not has been asserted. More... | |
+bool | isNotDone () const |
Return true if test is not has been asserted. | |
bool | isPassed () const |
Return true if test is passed. More... | |
+bool | isPassed () const |
Return true if test is passed. | |
bool | isNotPassed () const |
Return true if test is not passed. More... | |
+bool | isNotPassed () const |
Return true if test is not passed. | |
bool | isFailed () const |
Return true if test is failed. More... | |
+bool | isFailed () const |
Return true if test is failed. | |
bool | isNotFailed () const |
Return true if test is not failed. More... | |
+bool | isNotFailed () const |
Return true if test is not failed. | |
bool | isSkipped () const |
Return true if test is skipped. More... | |
+bool | isSkipped () const |
Return true if test is skipped. | |
bool | isNotSkipped () const |
Return true if test is not skipped. More... | |
+bool | isNotSkipped () const |
Return true if test is not skipped. | |
bool | isExpired () const |
Return true if test is expired. More... | |
+bool | isExpired () const |
Return true if test is expired. | |
bool | isNotExpired () const |
Return true if test is not expired. More... | |
+bool | isNotExpired () const |
Return true if test is not expired. | |
void | skip () |
Mark the test as skipped. More... | |
Mark the test as skipped. More... | |
void | expire () |
Mark the test as expired (i.e. More... | |
Mark the test as expired (i.e. More... | |
void | enableVerbosity (uint8_t verbosity) |
Enable the given verbosity of the current test. More... | |
+void | enableVerbosity (uint8_t verbosity) |
Enable the given verbosity of the current test. | |
void | disableVerbosity (uint8_t verbosity) |
Disable the given verbosity of the current test. More... | |
+void | disableVerbosity (uint8_t verbosity) |
Disable the given verbosity of the current test. | |
Static Public Member Functions | |
static Test ** | getRoot () |
Get the pointer to the root pointer. More... | |
Get the pointer to the root pointer. More... | |
Static Public Attributes | |
static const uint8_t | kLifeCycleNew = 0 |
Test is new, needs to be setup. More... | |
+static const uint8_t | kLifeCycleNew = 0 |
Test is new, needs to be setup. | |
static const uint8_t | kLifeCycleExcluded = 1 |
Test is Excluded by an exclude() method. More... | |
Test is Excluded by an exclude() method. More... | |
static const uint8_t | kLifeCycleSetup = 2 |
Test has been set up by calling setup() and ready to execute the test code. More... | |
Test has been set up by calling setup() and ready to execute the test code. More... | |
static const uint8_t | kLifeCycleAsserted = 3 |
Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined. More... | |
Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined. More... | |
static const uint8_t | kLifeCycleFinished = 4 |
The test has completed its life cycle. More... | |
The test has completed its life cycle. More... | |
static const uint8_t | kStatusUnknown = 0 |
Test status is unknown. More... | |
+static const uint8_t | kStatusUnknown = 0 |
Test status is unknown. | |
static const uint8_t | kStatusPassed = 1 |
Test has passed, or pass() was called. More... | |
+static const uint8_t | kStatusPassed = 1 |
Test has passed, or pass() was called. | |
static const uint8_t | kStatusFailed = 2 |
Test has failed, or fail() was called. More... | |
+static const uint8_t | kStatusFailed = 2 |
Test has failed, or fail() was called. | |
static const uint8_t | kStatusSkipped = 3 |
Test is skipped through the exclude() method or skip() was called. More... | |
+static const uint8_t | kStatusSkipped = 3 |
Test is skipped through the exclude() method or skip() was called. | |
static const uint8_t | kStatusExpired = 4 |
Test has timed out, or expire() called. More... | |
+static const uint8_t | kStatusExpired = 4 |
Test has timed out, or expire() called. | |
Protected Member Functions | |
void | fail () |
Mark the test as failed. More... | |
Mark the test as failed. More... | |
void | pass () |
Mark the test as passed. More... | |
Mark the test as passed. More... | |
void | init (const char *name) |
void | init (const __FlashStringHelper *name) |
bool | isVerbosity (uint8_t verbosity) const |
Determine if any of the given verbosity is enabled. More... | |
+bool | isVerbosity (uint8_t verbosity) const |
Determine if any of the given verbosity is enabled. | |
uint8_t | getVerbosity () const |
Get the verbosity. More... | |
+uint8_t | getVerbosity () const |
Get the verbosity. | |
Base class of all test cases.
-The test() and testing() macros define subclasses of Test or TestOnce (respectively), and allow the code following the macros in '{}' to become the body of the loop() and once() methods of the two classes (respectively).
+The test() and testing() macros define subclasses of Test or TestOnce (respectively), and allow the code following the macros in '{}' to become the body of the loop() and once() methods of the two classes (respectively).
-
|
- -inline | -
-
|
- -inline | -
Mark the test as expired (i.e.
-timed out). Use the expireTestNow() macro in a unit test to print a diagnostic message and exit immediately.
+timed out). Use the expireTestNow() macro in a unit test to print a diagnostic message and exit immediately.
Definition at line 235 of file Test.h.
@@ -375,68 +343,10 @@Mark the test as failed.
-Use the failTestNow() macro in a unit test to print a diagnostic message and exit immediately.
+Use the failTestNow() macro in a unit test to print a diagnostic message and exit immediately.
- - - -
-
|
- -inline | -
-
|
- -inline | -
Return the next pointer as a pointer to the pointer, similar to getRoot().
+Return the next pointer as a pointer to the pointer, similar to getRoot().
This makes it much easier to manipulate a singly-linked list. Also makes setNext() method unnecessary.
Definition at line 188 of file Test.h.
@@ -497,64 +407,6 @@
-
|
- -inline | -
-
|
- -inlineprotected | -
Return true if test has been asserted.
-Note that this is different than the internal LifeCycleFinished state. The name isDone() is a carry-over from ArduinoUnit and might have been named isAsserted() if this library had been built from scratch.
+Note that this is different than the internal LifeCycleFinished state. The name isDone() is a carry-over from ArduinoUnit and might have been named isAsserted() if this library had been built from scratch.
- -Return true if test is expired.
+The user-provided test case function.
+Each call to Test::run() makes one call to this loop() method. The assertXxx() macros, as well as pass(), fail() and skip() functions can be called in here.
-Definition at line 220 of file Test.h.
+Implemented in aunit::TestOnce, and aunit::TestAgain.
Return true if test is failed.
+Mark the test as passed.
+Often used to terminate a testing() looping test. The passTestNow() macro can be used in a unit test to print a diagnostic message and exit immediately. It is expected that pass() will be used more often.
- +bool aunit::Test::isNotDone | +void aunit::Test::setStatus | ( | -) | -const | +uint8_t | +status | ) | +
Return true if test is not has been asserted.
+Set the status of the test.
+All changes to getStatus() should happen through this method because it also changes the getLifeCycle() of the test.
- +Return true if test is not expired.
+Optional method that performs any initialization.
+The assertXxx() macros, as well as pass(), fail() and skip() functions can be called in here. Subclasses that override this should call the parent's setup() method in the first line so that the setup() methods in the inheritance tree are properly chained.
- +bool aunit::Test::isNotFailed | +void aunit::Test::skip | ( | ) | -const | +
Return true if test is not failed.
+Mark the test as skipped.
+Use the skipTestNow() macro in a unit test to print a diagnostic message and exit immediately.
- +Return true if test is not passed.
+Optional method that performs any clean up after the test ends for any reasons, either passing or otherwise.
+Subclasses that override this should call the parent's teardown() method in the last line before returning, so that the teardown() methods in the inheritance tree are properly chained.
- +Return true if test is not skipped.
+Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined.
+The teardown() method should be called.
- +Return true if test is passed.
+Test is Excluded by an exclude() method.
+The setup() and teardown() methods are bypassed and the test goes directly to kLifeCycleFinished. For reporting purposes, an excluded test is counted as a "skipped" test. The include() method puts the test back into the kLifeCycleNew state.
- +Return true if test is skipped.
+The test has completed its life cycle.
+It should be resolved using resolve() and removed from the linked list. Note that this is different than isDone() (i.e. kStatusDone) which indicates that an assertion about the test has been made.
- +
-
|
- -pure virtual | -
The user-provided test case function.
-Each call to Test::run() makes one call to this loop() method. The assertXxx() macros, as well as pass(), fail() and skip() functions can be called in here.
- -Implemented in aunit::TestOnce, and aunit::TestAgain.
- -
-
|
- -inlineprotected | -
Mark the test as passed.
-Often used to terminate a testing() looping test. The passTestNow() macro can be used in a unit test to print a diagnostic message and exit immediately. It is expected that pass() will be used more often.
- - - -void aunit::Test::resolve | -( | -) | -- |
void aunit::Test::setPassOrFail | -( | -bool | -ok | ) | -- |
-
|
- -inline | -
Set the status of the test.
-All changes to getStatus() should happen through this method because it also changes the getLifeCycle() of the test.
- - - -
-
|
- -inlinevirtual | -
Optional method that performs any initialization.
-The assertXxx() macros, as well as pass(), fail() and skip() functions can be called in here. Subclasses that override this should call the parent's setup() method in the first line so that the setup() methods in the inheritance tree are properly chained.
- - - -
-
|
- -inline | -
Mark the test as skipped.
-Use the skipTestNow() macro in a unit test to print a diagnostic message and exit immediately.
- - - -
-
|
- -inlinevirtual | -
Optional method that performs any clean up after the test ends for any reasons, either passing or otherwise.
-Subclasses that override this should call the parent's teardown() method in the last line before returning, so that the teardown() methods in the inheritance tree are properly chained.
- - - -
-
|
- -static | -
Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined.
-The teardown() method should be called.
- - - -
-
|
- -static | -
Test is Excluded by an exclude() method.
-The setup() and teardown() methods are bypassed and the test goes directly to kLifeCycleFinished. For reporting purposes, an excluded test is counted as a "skipped" test. The include() method puts the test back into the kLifeCycleNew state.
- - - -
-
|
- -static | -
-
|
- -static | -
-
|
- -static | -
Test has been set up by calling setup() and ready to execute the test code.
-TestOnce tests (i.e. test() or testF()) should be in Setup state only for a single iteration. TestAgain tests (i.e. testing() or testingF()) will stay in Setup state until explicitly moved to a different state by the testing code (or the test times out).
+Test has been set up by calling setup() and ready to execute the test code.
+TestOnce tests (i.e. test() or testF()) should be in Setup state only for a single iteration. TestAgain tests (i.e. testing() or testingF()) will stay in Setup state until explicitly moved to a different state by the testing code (or the test times out).
-
-
|
- -static | -
-
|
- -static | -
-
|
- -static | -
-
|
- -static | -
-
|
- -static | -
Similar to TestOnce but performs the user-defined test multiple times. +
Similar to TestOnce but performs the user-defined test multiple times. More...
#include <TestAgain.h>
Public Member Functions | |
TestAgain () | |
Constructor. More... | |
+ | TestAgain () |
Constructor. | |
void | loop () override |
Calls the user-provided again() method multiple times until the user code explicitly resolves the test using pass(), fail(), skip() or expire(). | |
Calls the user-provided again() method multiple times until the user code explicitly resolves the test using pass(), fail(), skip() or expire(). | |
virtual void | again ()=0 |
User-provided test case. More... | |
+virtual void | again ()=0 |
User-provided test case. | |
Public Member Functions inherited from aunit::Test | |
Test () | |
virtual void | teardown () |
Optional method that performs any clean up after the test ends for any reasons, either passing or otherwise. More... | |
void | resolve () |
Print out the summary of the current test. More... | |
+void | resolve () |
Print out the summary of the current test. | |
const internal::FCString & | getName () const |
Get the name of the test. More... | |
+const internal::FCString & | getName () const |
Get the name of the test. | |
uint8_t | getLifeCycle () const |
Get the life cycle state of the test. More... | |
+uint8_t | getLifeCycle () const |
Get the life cycle state of the test. | |
void | setLifeCycle (uint8_t state) |
uint8_t | getStatus () const |
Get the status of the test. More... | |
+uint8_t | getStatus () const |
Get the status of the test. | |
void | setStatus (uint8_t status) |
Set the status of the test. More... | |
void | setPassOrFail (bool ok) |
Set the status to Passed or Failed depending on ok. More... | |
+void | setPassOrFail (bool ok) |
Set the status to Passed or Failed depending on ok. | |
Test ** | getNext () |
Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | |
Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | |
bool | isDone () const |
Return true if test has been asserted. More... | |
bool | isNotDone () const |
Return true if test is not has been asserted. More... | |
+bool | isNotDone () const |
Return true if test is not has been asserted. | |
bool | isPassed () const |
Return true if test is passed. More... | |
+bool | isPassed () const |
Return true if test is passed. | |
bool | isNotPassed () const |
Return true if test is not passed. More... | |
+bool | isNotPassed () const |
Return true if test is not passed. | |
bool | isFailed () const |
Return true if test is failed. More... | |
+bool | isFailed () const |
Return true if test is failed. | |
bool | isNotFailed () const |
Return true if test is not failed. More... | |
+bool | isNotFailed () const |
Return true if test is not failed. | |
bool | isSkipped () const |
Return true if test is skipped. More... | |
+bool | isSkipped () const |
Return true if test is skipped. | |
bool | isNotSkipped () const |
Return true if test is not skipped. More... | |
+bool | isNotSkipped () const |
Return true if test is not skipped. | |
bool | isExpired () const |
Return true if test is expired. More... | |
+bool | isExpired () const |
Return true if test is expired. | |
bool | isNotExpired () const |
Return true if test is not expired. More... | |
+bool | isNotExpired () const |
Return true if test is not expired. | |
void | skip () |
Mark the test as skipped. More... | |
void | expire () |
Mark the test as expired (i.e. More... | |
void | enableVerbosity (uint8_t verbosity) |
Enable the given verbosity of the current test. More... | |
+void | enableVerbosity (uint8_t verbosity) |
Enable the given verbosity of the current test. | |
void | disableVerbosity (uint8_t verbosity) |
Disable the given verbosity of the current test. More... | |
+void | disableVerbosity (uint8_t verbosity) |
Disable the given verbosity of the current test. | |
@@ -193,56 +216,67 @@
| Get the pointer to the root pointer. More... | | | Test is new, needs to be setup. | | | Test is Excluded by an exclude() method. More... | | | Test has been set up by calling setup() and ready to execute the test code. More... | | | Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined. More... | | static const uint8_t | kLifeCycleFinished = 4 | | The test has completed its life cycle. More... | | Test status is unknown. | | Test has passed, or pass() was called. | | Test has failed, or fail() was called. | | Test is skipped through the exclude() method or skip() was called. | | Test has timed out, or expire() called. | | | Empty constructor. | |
bool | assertionTestStatus (const char *file, uint16_t line, const char *testName, const __FlashStringHelper *statusMessage, bool ok) | | Set the status of the current test using the 'ok' status from another test, and print the assertion message if requested. | | Return true if setting of status should print a message. | | Set the status of the current test to 'status' and print a message. | | | Empty constructor. | | Returns true if an assertion message should be printed. | |
void | init (const __FlashStringHelper *name) | | Determine if any of the given verbosity is enabled. | | Get the verbosity. | | Static Protected Attributes inherited from aunit::MetaAssertion |
@@ -440,77 +476,19 @@
| | |
Similar to TestOnce but performs the user-defined test multiple times.
+Similar to TestOnce but performs the user-defined test multiple times.
Definition at line 37 of file TestAgain.h.
-
-
|
- -inline | -
Constructor.
- -Definition at line 40 of file TestAgain.h.
- -
-
|
- -pure virtual | -
User-provided test case.
- -Similar to TestAgain but performs user-defined test only once. +
Similar to TestAgain but performs user-defined test only once. More...
#include <TestOnce.h>
Public Member Functions | |
TestOnce () | |
Constructor. More... | |
+ | TestOnce () |
Constructor. | |
void | loop () override |
Calls the user-provided once() method. More... | |
Calls the user-provided once() method. More... | |
virtual void | once ()=0 |
User-provided test case. More... | |
+virtual void | once ()=0 |
User-provided test case. | |
Public Member Functions inherited from aunit::Test | |
Test () | |
virtual void | teardown () |
Optional method that performs any clean up after the test ends for any reasons, either passing or otherwise. More... | |
void | resolve () |
Print out the summary of the current test. More... | |
+void | resolve () |
Print out the summary of the current test. | |
const internal::FCString & | getName () const |
Get the name of the test. More... | |
+const internal::FCString & | getName () const |
Get the name of the test. | |
uint8_t | getLifeCycle () const |
Get the life cycle state of the test. More... | |
+uint8_t | getLifeCycle () const |
Get the life cycle state of the test. | |
void | setLifeCycle (uint8_t state) |
uint8_t | getStatus () const |
Get the status of the test. More... | |
+uint8_t | getStatus () const |
Get the status of the test. | |
void | setStatus (uint8_t status) |
Set the status of the test. More... | |
void | setPassOrFail (bool ok) |
Set the status to Passed or Failed depending on ok. More... | |
+void | setPassOrFail (bool ok) |
Set the status to Passed or Failed depending on ok. | |
Test ** | getNext () |
Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | |
Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | |
bool | isDone () const |
Return true if test has been asserted. More... | |
bool | isNotDone () const |
Return true if test is not has been asserted. More... | |
+bool | isNotDone () const |
Return true if test is not has been asserted. | |
bool | isPassed () const |
Return true if test is passed. More... | |
+bool | isPassed () const |
Return true if test is passed. | |
bool | isNotPassed () const |
Return true if test is not passed. More... | |
+bool | isNotPassed () const |
Return true if test is not passed. | |
bool | isFailed () const |
Return true if test is failed. More... | |
+bool | isFailed () const |
Return true if test is failed. | |
bool | isNotFailed () const |
Return true if test is not failed. More... | |
+bool | isNotFailed () const |
Return true if test is not failed. | |
bool | isSkipped () const |
Return true if test is skipped. More... | |
+bool | isSkipped () const |
Return true if test is skipped. | |
bool | isNotSkipped () const |
Return true if test is not skipped. More... | |
+bool | isNotSkipped () const |
Return true if test is not skipped. | |
bool | isExpired () const |
Return true if test is expired. More... | |
+bool | isExpired () const |
Return true if test is expired. | |
bool | isNotExpired () const |
Return true if test is not expired. More... | |
+bool | isNotExpired () const |
Return true if test is not expired. | |
void | skip () |
Mark the test as skipped. More... | |
void | expire () |
Mark the test as expired (i.e. More... | |
void | enableVerbosity (uint8_t verbosity) |
Enable the given verbosity of the current test. More... | |
+void | enableVerbosity (uint8_t verbosity) |
Enable the given verbosity of the current test. | |
void | disableVerbosity (uint8_t verbosity) |
Disable the given verbosity of the current test. More... | |
+void | disableVerbosity (uint8_t verbosity) |
Disable the given verbosity of the current test. | |
@@ -192,56 +215,67 @@
| Get the pointer to the root pointer. More... | | | Test is new, needs to be setup. | | | Test is Excluded by an exclude() method. More... | | | Test has been set up by calling setup() and ready to execute the test code. More... | | | Test is asserted (using pass(), fail(), expired() or skipped()) and the getStatus() has been determined. More... | | static const uint8_t | kLifeCycleFinished = 4 | | The test has completed its life cycle. More... | | Test status is unknown. | | Test has passed, or pass() was called. | | Test has failed, or fail() was called. | | Test is skipped through the exclude() method or skip() was called. | | Test has timed out, or expire() called. | | | Empty constructor. | |
bool | assertionTestStatus (const char *file, uint16_t line, const char *testName, const __FlashStringHelper *statusMessage, bool ok) | | Set the status of the current test using the 'ok' status from another test, and print the assertion message if requested. | | Return true if setting of status should print a message. | | Set the status of the current test to 'status' and print a message. | | | Empty constructor. | | Returns true if an assertion message should be printed. | |
void | init (const __FlashStringHelper *name) | | Determine if any of the given verbosity is enabled. | | Get the verbosity. | | Static Protected Attributes inherited from aunit::MetaAssertion |
@@ -439,40 +475,10 @@
| | |
Similar to TestAgain but performs user-defined test only once.
+Similar to TestAgain but performs user-defined test only once.
Definition at line 40 of file TestOnce.h.
-
-
|
- -inline | -
Constructor.
- -Definition at line 43 of file TestOnce.h.
- -Calls the user-provided once() method.
-If no other assertXxx() macros set the internal status, then this calls pass() to make sure that this test case will be called only once from Test::run().
+Calls the user-provided once() method.
+If no other assertXxx() macros set the internal status, then this calls pass() to make sure that this test case will be called only once from Test::run().
Implements aunit::Test.
Definition at line 29 of file TestOnce.cpp.
-
-
|
- -pure virtual | -
User-provided test case.
-The class that runs the various test cases defined by the test() and testing() macros. +
The class that runs the various test cases defined by the test() and testing() macros. More...
#include <TestRunner.h>
Public Types | |
typedef uint8_t | TimeoutType |
Integer type of the timeout parameter. More... | |
typedef uint16_t | TimeoutType |
Integer type of the timeout parameter. More... | |
Static Public Member Functions | |
static void | run () |
Run all tests using the current runner. More... | |
+static void | run () |
Run all tests using the current runner. | |
static void | list () |
Print out the known tests. More... | |
Print out the known tests. More... | |
static void | exclude (const char *pattern) |
Exclude the tests which match the pattern. More... | |
Exclude the tests which match the pattern. More... | |
static void | exclude (const char *testClass, const char *pattern) |
Exclude the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro. More... | |
Exclude the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro. More... | |
static void | include (const char *pattern) |
Include the tests which match the pattern. More... | |
Include the tests which match the pattern. More... | |
static void | include (const char *testClass, const char *pattern) |
Include the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro. More... | |
Include the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro. More... | |
static void | setVerbosity (uint8_t verbosity) |
Set the verbosity flag. More... | |
+static void | setVerbosity (uint8_t verbosity) |
Set the verbosity flag. | |
static bool | isVerbosity (uint8_t verbosity) |
Returns true if ANY of the bit flags of 'verbosity' is set. More... | |
+static bool | isVerbosity (uint8_t verbosity) |
Returns true if ANY of the bit flags of 'verbosity' is set. | |
static void | setPrinter (Print *printer) |
Set the output printer. More... | |
+static void | setPrinter (Print *printer) |
Set the output printer. | |
static void | setTimeout (TimeoutType seconds) |
Set test runner timeout across all tests, in seconds. More... | |
static void | setTimeout (TimeoutType seconds) |
Set test runner timeout across all tests, in seconds. More... | |
The class that runs the various test cases defined by the test() and testing() macros.
-It prints the summary of each test as well as the final summary of the entire run at the end. In the future, it may be possible to allow a different TestRunner to be used.
+The class that runs the various test cases defined by the test() and testing() macros.
+It prints the summary of each test as well as the final summary of the entire run at the end. In the future, it may be possible to allow a different TestRunner to be used.
Definition at line 41 of file TestRunner.h.
typedef uint8_t aunit::TestRunner::TimeoutType | +typedef uint16_t aunit::TestRunner::TimeoutType |
Integer type of the timeout parameter.
-Seconds.
+Seconds. Default is kTimeoutDefault = 10
Definition at line 44 of file TestRunner.h.
@@ -208,7 +215,7 @@Exclude the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro.
+Exclude the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro.
Currently supports only a trailing '*'. For example, exclude("CustomTest", "flash*").
Definition at line 67 of file TestRunner.h.
@@ -280,41 +287,11 @@Include the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro.
+Include the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro.
Currently supports only a trailing '*'. For example, include("CustomTest", "flash*").
Definition at line 86 of file TestRunner.h.
-
-
|
- -inlinestatic | -
Returns true if ANY of the bit flags of 'verbosity' is set.
- -Definition at line 97 of file TestRunner.h.
-
-
|
- -inlinestatic | -
Run all tests using the current runner.
- -Definition at line 47 of file TestRunner.h.
- -
-
|
- -static | -
Set the output printer.
- -Definition at line 47 of file TestRunner.cpp.
-Set test runner timeout across all tests, in seconds.
-Set to 0 for infinite timeout. Useful for preventing testing() test cases that never end. This is a timeout for the TestRunner itself, not for individual tests.
+Set to 0 for infinite timeout. Useful for preventing testing() test cases that never end. This is a timeout for the TestRunner itself, not for individual tests. Upper limit is 65535 seconds (just over 18 hours).
Definition at line 110 of file TestRunner.h.
-
-
|
- -inlinestatic | -
Set the verbosity flag.
- -Definition at line 92 of file TestRunner.h.
-Utility class to hold the Verbosity constants. +
Utility class to hold the Verbosity constants. More...
#include <Verbosity.h>
Static Public Attributes | |
static const uint8_t | kAssertionPassed = 0x01 |
Print assertXxx() passed message. More... | |
+static const uint8_t | kAssertionPassed = 0x01 |
Print assertXxx() passed message. | |
static const uint8_t | kAssertionFailed = 0x02 |
Print assertXxx() failed message. More... | |
+static const uint8_t | kAssertionFailed = 0x02 |
Print assertXxx() failed message. | |
static const uint8_t | kTestPassed = 0x04 |
Print test passed message. More... | |
+static const uint8_t | kTestPassed = 0x04 |
Print test passed message. | |
static const uint8_t | kTestFailed = 0x08 |
Print test failed message. More... | |
+static const uint8_t | kTestFailed = 0x08 |
Print test failed message. | |
static const uint8_t | kTestSkipped = 0x10 |
Print test skipped message. More... | |
+static const uint8_t | kTestSkipped = 0x10 |
Print test skipped message. | |
static const uint8_t | kTestExpired = 0x20 |
Print test timed out message. More... | |
+static const uint8_t | kTestExpired = 0x20 |
Print test timed out message. | |
static const uint8_t | kTestRunSummary = 0x40 |
Print TestRunner summary message. More... | |
+static const uint8_t | kTestRunSummary = 0x40 |
Print TestRunner summary message. | |
static const uint8_t | kAssertionAll = (kAssertionPassed | kAssertionFailed) |
Print all assertXxx() messages. More... | |
+static const uint8_t | kAssertionAll = (kAssertionPassed | kAssertionFailed) |
Print all assertXxx() messages. | |
static const uint8_t | kTestAll |
Print all test status messages. More... | |
Print all test status messages. More... | |
static const uint8_t | kDefault |
The default verbosity. More... | |
The default verbosity. More... | |
static const uint8_t | kAll = 0xFF |
Print all messages. More... | |
+static const uint8_t | kAll = 0xFF |
Print all messages. | |
static const uint8_t | kNone = 0x00 |
Print no messages. More... | |
+static const uint8_t | kNone = 0x00 |
Print no messages. | |
Utility class to hold the Verbosity constants.
-Current used only by TestRunner but potentially could be used by Test and TestOnce in the future, so it seemed better to pull these out into a separate file.
+Utility class to hold the Verbosity constants.
+Current used only by TestRunner but potentially could be used by Test and TestOnce in the future, so it seemed better to pull these out into a separate file.
Definition at line 37 of file Verbosity.h.
-
|
- -static | -
Print all messages.
- -Definition at line 73 of file Verbosity.h.
- -
-
|
- -static | -
Print all assertXxx() messages.
- -Definition at line 62 of file Verbosity.h.
- -
-
|
- -static | -
Print assertXxx() failed message.
- -Definition at line 43 of file Verbosity.h.
- -
-
|
- -static | -
Print assertXxx() passed message.
- -Definition at line 40 of file Verbosity.h.
- -The default verbosity.
Definition at line 69 of file Verbosity.h.
-
-
|
- -static | -
Print no messages.
- -Definition at line 76 of file Verbosity.h.
-Print all test status messages.
Definition at line 65 of file Verbosity.h.
-
-
|
- -static | -
Print test timed out message.
- -Definition at line 55 of file Verbosity.h.
- -
-
|
- -static | -
Print test failed message.
- -Definition at line 49 of file Verbosity.h.
- -
-
|
- -static | -
Print test passed message.
- -Definition at line 46 of file Verbosity.h.
- -
-
|
- -static | -
Print TestRunner summary message.
- -Definition at line 58 of file Verbosity.h.
- -
-
|
- -static | -
Print test skipped message.
- -Definition at line 52 of file Verbosity.h.
-@@ -100,18 +111,18 @@ void | flush () override | |
const char * | getBuffer () const | |
Return the NUL terminated string buffer. More... | ||
Return the NUL terminated string buffer. More... | ||
Static Public Attributes | |
static const uint8_t | kBufSize = 8 * sizeof(long long) + 2 + 1 |
Size of the internal buffer. More... | |
Size of the internal buffer. More... | |
An implementation of Print that writes to an in-memory buffer.
-The buffer can be retrieved using getBuffer() to verify that the expected string was written to the Print object.
+The buffer can be retrieved using getBuffer() to verify that the expected string was written to the Print object.
Usage:
* { * FakePrint fakePrint; * object.printTo(fakePrint); @@ -181,14 +192,14 @@FakePrint.h +
/home/brian/src/AUnit/src/aunit/fake/FakePrint.h
@@ -125,126 +137,14 @@ |
A union of (const char*) and (const __FlashStringHelper*) with a discriminator.
-This allows us to treat these 2 strings like a single object. The major reason this class is needed is because the F() cannot be used outside a function, it can only be used inside a function, so we are forced to use normal c-strings instead of F() strings when manually creating Test or TestOnce instances.
+This allows us to treat these 2 strings like a single object. The major reason this class is needed is because the F() cannot be used outside a function, it can only be used inside a function, so we are forced to use normal c-strings instead of F() strings when manually creating Test or TestOnce instances.
I deliberately decided not to inherit from Printable. While it is convenient to be able to call Print::print() with an instance of this class, the cost is 2 (AVR) or 4 (Teensy-ARM or ESP8266) extra bytes of static memory for the v-table pointer for each instance. But each instance is only 3 (AVR) or 5 (Teensy-ARM or ESP8266) bytes big, so the cost of 50-100 bytes of static memory for a large suite of 25 unit tests does not seem worth the minor convenience.
-Instead, the print() and println() methods invert the dependency and accept a pointer to 'Print'.
+Instead, the print() and println() methods invert the dependency and accept a pointer to 'Print'.
Definition at line 55 of file FCString.h.
-
-
|
- -inline | -
Default constructor initializes to a nullptr of kCStringType.
- -Definition at line 61 of file FCString.h.
- -
-
|
- -inlineexplicit | -
Construct with a c-string.
- -Definition at line 64 of file FCString.h.
- -
-
|
- -inlineexplicit | -
Construct with a flash string.
- -Definition at line 70 of file FCString.h.
- -int aunit::internal::FCString::compareTo | -( | -const FCString & | -that | ) | -const | -
Compare to another FCString.
- -Definition at line 55 of file FCString.cpp.
- -Compare to C-string using the first n characters.
-This is expected to be used only for TestRunner::exclude() and TestRunner::include().
+Compare to a flash string using the first n characters.
+This is expected to be used only for TestRunner::exclude() and TestRunner::include().
-Definition at line 71 of file FCString.cpp.
+Definition at line 79 of file FCString.cpp.
- -Compare to a flash string using the first n characters.
-This is expected to be used only for TestRunner::exclude() and TestRunner::include().
- -Definition at line 79 of file FCString.cpp.
- - - - -
-
|
- -inline | -
Get the c-string pointer.
- -Definition at line 79 of file FCString.h.
- -
-
|
- -inline | -
Get the flash string pointer.
- -Definition at line 82 of file FCString.h.
- -
-
|
- -inline | -
Get the internal type of string.
- -Definition at line 76 of file FCString.h.
- -void aunit::internal::FCString::print | -( | -Print * | -printer | ) | -const | -
Convenience method for printing an FCString.
- -Definition at line 32 of file FCString.cpp.
- -void aunit::internal::FCString::println | -( | -Print * | -printer | ) | -const | -
Convenience method for printing an FCString.
+Compare to C-string using the first n characters.
+This is expected to be used only for TestRunner::exclude() and TestRunner::include().
-Definition at line 42 of file FCString.cpp.
+Definition at line 71 of file FCString.cpp.
| FCString (aunit::internal) |
| TestRunner (aunit) | FCString (aunit::internal) | +
|
+TestRunner (aunit) | +
|
| ||||
Assertion (aunit) | Test (aunit) |
|
+
+|||
Assertion (aunit) | +Test (aunit) | +||||
| MetaAssertion (aunit) | TestAgain (aunit) | Verbosity (aunit) | MetaAssertion (aunit) | +TestAgain (aunit) | +Verbosity (aunit) | +
| TestOnce (aunit) | ||||
FakePrint (aunit::fake) | |||||
Printer (aunit) | TestOnce (aunit) | ++ | |||
FakePrint (aunit::fake) | +|||||
Printer (aunit) | +|||||
Generated by - 1.8.13 + 1.8.17 diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html index f32cce0..adda4bb 100644 --- a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -1,11 +1,11 @@ - + - + - |
---|
AUnit
- 1.3.2
+ 1.3.3
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
|
@@ -31,18 +31,21 @@
Files | |
file | AUnit.h [code] |
Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided. | |
file | AUnitVerbose.h [code] |
Same as AUnit.h except that the verbose versions of the various assertXxx() macros are provided. | |
This page explains how to interpret the graphs that are generated by doxygen.
-Consider the following example:
This will result in the following graph:
-The boxes in the above graph have the following meaning:
+Consider the following example:
This will result in the following graph:
+The boxes in the above graph have the following meaning:
A simple adapter which allows basic unit tests written using Google Test API (https://github.com/google/googletest) to run on Arduino platforms using AUnit. -More...
-Go to the source code of this file.
@@ -122,18 +122,25 @@
| |
A simple adapter which allows basic unit tests written using Google Test API (https://github.com/google/googletest) to run on Arduino platforms using AUnit.
+A simple adapter which allows basic unit tests written using Google Test API (https://github.com/google/googletest) to run on Arduino platforms using AUnit.
This is not a comprehensive mapping layer. Only the TEST() macro is supported, TEST_F() is not supported. Many of the ASSERT_Xxx() macros are missing. Over time, more mapping macros may be added.
Usage:
-or
-or
+Definition in file gtest.h.
This is the Doxygen documentation for the AUnit Library.
-+ |
|
+ |
|
+ |
|
+ |
|
+ |
|
+ |
|
This directory contains fake versions of some Arduino classes for the purposes of unit testing. These header files are not included automatically by the #include <AUnit.h>
preprocessor directive. The various fake classes must be included manually just after the <AUnit.h>
is included. The fake classes live in the aunit::fake
namespace.
This directory contains fake versions of some Arduino classes for the purposes of unit testing. These header files are not included automatically by the #include <AUnit.h>
preprocessor directive. The various fake classes must be included manually just after the <AUnit.h>
is included. The fake classes live in the aunit::fake
namespace.
The FakePrint
class is an implementation of the Print class which is the base class of the HardwareSerial and other output classes. The Serial
global object is an instance of the HardwareSerial
class. If a user-defined class or method is defined to use an instance of the Print
object, instead of hardcoding a dependency to the Serial
instance, then an instance of the FakePrint
class can be substituted and used to write unit tests for the user-defined class or method.
Let's say the user-defined class is called Greeter
and a method called greet()
prints something out to Serial
:
If we want to verify that the Greeter::greet()
method prints what is expected, we inject an instance of FakePrint
(instead of Serial
) in a test called GreeterTest.ino
:
If we want to verify that the Greeter::greet()
method prints what is expected, we inject an instance of FakePrint
(instead of Serial
) in a test called GreeterTest.ino
: