"Fossies" - the Fresh Open Source Software Archive

Member "cb2bib-2.0.1/src/c2bTests.h" (12 Feb 2021, 1453 Bytes) of package /linux/privat/cb2bib-2.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "c2bTests.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.0.0_vs_2.0.1.

    1 /***************************************************************************
    2  *   Copyright (C) 2004-2021 by Pere Constans
    3  *   constans@molspaces.com
    4  *   cb2Bib version 2.0.1. Licensed under the GNU GPL version 3.
    5  *   See the LICENSE file that comes with this distribution.
    6  ***************************************************************************/
    7 #ifndef C2BTESTS_H
    8 #define C2BTESTS_H
    9 
   10 #include <QString>
   11 
   12 class QTextStream;
   13 class bibParser;
   14 class bibReference;
   15 
   16 
   17 /**
   18     Test cb2Bib functionality
   19 */
   20 class c2bTests
   21 {
   22 
   23 public:
   24     c2bTests();
   25     ~c2bTests();
   26 
   27     int allTests();
   28     int writeInformation();
   29 
   30 
   31 private:
   32     QString _bibliographic_dir;
   33     QTextStream& cout;
   34     int _failed_test_count;
   35     int _test_count;
   36     void author_parser();
   37     void check_abbreviations_txt();
   38     void check_test(const bool passed, const QString& input, const QString& output);
   39     void compression_check();
   40     void heuristic(bibParser& bp, const bibReference& reference, const QString& text);
   41     void heuristic_author();
   42     void heuristic_check_patterns();
   43     void heuristic_journal();
   44     void heuristic_misc();
   45     void heuristic_pvny();
   46     void write(const bibParser& bp, const bibReference& reference);
   47     void write_information();
   48 
   49     static QString decomposition(const QChar& c);
   50 
   51     static inline const char* boolToStr(bool b)
   52     {
   53         if (b)
   54             return "passed";
   55         else
   56             return "failed";
   57     }
   58 };
   59 
   60 #endif