├── .clang-format
├── .github
└── workflows
│ └── ci.yml
├── .gitignore
├── .idea
├── encodings.xml
├── fann.iml
├── misc.xml
├── modules.xml
├── runConfigurations
│ └── Tests.xml
└── vcs.xml
├── .travis.yml
├── CMakeLists.txt
├── LICENSE.md
├── README.md
├── VS2010
├── cascade_train
│ ├── cascade_train.vcxproj
│ └── cascade_train.vcxproj.filters
├── fann.sln
├── fann_tests.sln
├── fanndouble
│ ├── fanndouble.vcxproj
│ └── fanndouble.vcxproj.filters
├── fannfixed
│ ├── fannfixed.filters
│ └── fannfixed.vcxproj
├── fannfloat
│ ├── fannfloat.vcxproj
│ └── fannfloat.vcxproj.filters
├── gtest
│ ├── gtest.vcxproj
│ └── gtest.vcxproj.filters
├── momentums
│ ├── momentums.vcxproj
│ └── momentums.vcxproj.filters
├── mushroom
│ ├── mushroom.vcxproj
│ └── mushroom.vcxproj.filters
├── parallel_train
│ ├── parallel_train.vcxproj
│ └── parallel_train.vcxproj.filters
├── robot
│ ├── robot.vcxproj
│ └── robot.vcxproj.filters
├── scaling_test
│ ├── scaling_test.vcxproj
│ └── scaling_test.vcxproj.filters
├── scaling_train
│ ├── scaling_train.vcxproj
│ └── scaling_train.vcxproj.filters
├── simple_train_double
│ ├── simple_train_double.vcxproj
│ └── simple_train_double.vcxproj.filters
├── simple_train_float
│ ├── simple_train_float.vcxproj
│ └── simple_train_float.vcxproj.filters
├── steepness_train
│ ├── steepness_train.vcxproj
│ └── steepness_train.vcxproj.filters
├── tests_float
│ ├── tests_float.vcxproj
│ └── tests_float.vcxproj.filters
├── xor_cpp_sample
│ ├── xor_cpp_sample.vcxproj
│ └── xor_cpp_sample.vcxproj.filters
├── xor_test_fixed
│ ├── xor_test_fixed.vcxproj
│ └── xor_test_fixed.vcxproj.filters
├── xor_test_float
│ ├── xor_test_float.vcxproj
│ └── xor_test_float.vcxproj.filters
└── xor_train
│ ├── xor_train.vcxproj
│ └── xor_train.vcxproj.filters
├── biicode.conf
├── bin
└── .gitignore
├── ci.sh
├── cmake
├── Modules
│ └── DefineInstallationPaths.cmake
├── config.h.in
├── fann-config.cmake.in
├── fann-use.cmake
└── fann.pc.cmake
├── datasets
├── abelone.test
├── abelone.train
├── bank32fm.test
├── bank32fm.train
├── bank32nh.test
├── bank32nh.train
├── building.test
├── building.train
├── census-house.test
├── census-house.train
├── diabetes.test
├── diabetes.train
├── gene.test
├── gene.train
├── kin32fm.test
├── kin32fm.train
├── mushroom.test
├── mushroom.train
├── parity13.test
├── parity13.train
├── parity8.test
├── parity8.train
├── pumadyn-32fm.test
├── pumadyn-32fm.train
├── robot.test
├── robot.train
├── scaling.data
├── soybean.test
├── soybean.train
├── thyroid.test
├── thyroid.train
├── two-spiral.test
└── two-spiral.train
├── docs
├── NaturalDocs-1.52
│ ├── Config
│ │ ├── Languages.txt
│ │ └── Topics.txt
│ ├── Help
│ │ ├── customizinglanguages.html
│ │ ├── customizingtopics.html
│ │ ├── documenting.html
│ │ ├── documenting
│ │ │ ├── reference.html
│ │ │ └── walkthrough.html
│ │ ├── example
│ │ │ ├── Default.css
│ │ │ ├── NaturalDocs.js
│ │ │ ├── Roman.css
│ │ │ ├── Small.css
│ │ │ └── showstyle.html
│ │ ├── examples.css
│ │ ├── images
│ │ │ ├── header
│ │ │ │ ├── background.png
│ │ │ │ ├── leftside.png
│ │ │ │ ├── logo.png
│ │ │ │ ├── overbody.png
│ │ │ │ ├── overbodybg.png
│ │ │ │ ├── overleftmargin.png
│ │ │ │ ├── overmenu.png
│ │ │ │ ├── overmenubg.png
│ │ │ │ └── rightside.png
│ │ │ └── menu
│ │ │ │ ├── about.png
│ │ │ │ ├── background.png
│ │ │ │ ├── bottomleft.png
│ │ │ │ ├── bottomright.png
│ │ │ │ ├── community.png
│ │ │ │ ├── customizing.png
│ │ │ │ └── using.png
│ │ ├── index.html
│ │ ├── javascript
│ │ │ ├── BrowserStyles.js
│ │ │ └── PNGHandling.js
│ │ ├── keywords.html
│ │ ├── languages.html
│ │ ├── menu.html
│ │ ├── output.html
│ │ ├── running.html
│ │ ├── styles.css
│ │ ├── styles.html
│ │ └── troubleshooting.html
│ ├── Info
│ │ ├── CSSGuide.txt
│ │ ├── File Parsing.txt
│ │ ├── HTMLTestCases.pm
│ │ ├── Languages.txt
│ │ ├── NDMarkup.txt
│ │ ├── Symbol Management.txt
│ │ └── images
│ │ │ └── Logo.png
│ ├── JavaScript
│ │ ├── GooglePrettify.js
│ │ └── NaturalDocs.js
│ ├── License.txt
│ ├── Modules
│ │ └── NaturalDocs
│ │ │ ├── BinaryFile.pm
│ │ │ ├── Builder.pm
│ │ │ ├── Builder
│ │ │ ├── Base.pm
│ │ │ ├── FramedHTML.pm
│ │ │ ├── HTML.pm
│ │ │ └── HTMLBase.pm
│ │ │ ├── ClassHierarchy.pm
│ │ │ ├── ClassHierarchy
│ │ │ ├── Class.pm
│ │ │ └── File.pm
│ │ │ ├── ConfigFile.pm
│ │ │ ├── Constants.pm
│ │ │ ├── DefineMembers.pm
│ │ │ ├── Error.pm
│ │ │ ├── File.pm
│ │ │ ├── ImageReferenceTable.pm
│ │ │ ├── ImageReferenceTable
│ │ │ ├── Reference.pm
│ │ │ └── String.pm
│ │ │ ├── Languages.pm
│ │ │ ├── Languages
│ │ │ ├── ActionScript.pm
│ │ │ ├── Ada.pm
│ │ │ ├── Advanced.pm
│ │ │ ├── Advanced
│ │ │ │ ├── Scope.pm
│ │ │ │ └── ScopeChange.pm
│ │ │ ├── Base.pm
│ │ │ ├── CSharp.pm
│ │ │ ├── PLSQL.pm
│ │ │ ├── Pascal.pm
│ │ │ ├── Perl.pm
│ │ │ ├── Prototype.pm
│ │ │ ├── Prototype
│ │ │ │ └── Parameter.pm
│ │ │ ├── Simple.pm
│ │ │ └── Tcl.pm
│ │ │ ├── LineReader.pm
│ │ │ ├── Menu.pm
│ │ │ ├── Menu
│ │ │ └── Entry.pm
│ │ │ ├── NDMarkup.pm
│ │ │ ├── Parser.pm
│ │ │ ├── Parser
│ │ │ ├── JavaDoc.pm
│ │ │ ├── Native.pm
│ │ │ └── ParsedTopic.pm
│ │ │ ├── Project.pm
│ │ │ ├── Project
│ │ │ ├── ImageFile.pm
│ │ │ └── SourceFile.pm
│ │ │ ├── ReferenceString.pm
│ │ │ ├── Settings.pm
│ │ │ ├── Settings
│ │ │ └── BuildTarget.pm
│ │ │ ├── SourceDB.pm
│ │ │ ├── SourceDB
│ │ │ ├── Extension.pm
│ │ │ ├── File.pm
│ │ │ ├── Item.pm
│ │ │ ├── ItemDefinition.pm
│ │ │ └── WatchedFileDefinitions.pm
│ │ │ ├── StatusMessage.pm
│ │ │ ├── SymbolString.pm
│ │ │ ├── SymbolTable.pm
│ │ │ ├── SymbolTable
│ │ │ ├── File.pm
│ │ │ ├── IndexElement.pm
│ │ │ ├── Reference.pm
│ │ │ ├── ReferenceTarget.pm
│ │ │ ├── Symbol.pm
│ │ │ └── SymbolDefinition.pm
│ │ │ ├── Topics.pm
│ │ │ ├── Topics
│ │ │ └── Type.pm
│ │ │ └── Version.pm
│ ├── NaturalDocs
│ ├── NaturalDocs.bat
│ └── Styles
│ │ ├── Default.css
│ │ ├── Roman.css
│ │ └── Small.css
├── generate_docs.sh
├── prj
│ ├── Languages.txt
│ ├── Menu.txt
│ └── Topics.txt
└── publish_docs.sh
├── examples
├── .gitignore
├── Makefile
├── cascade_train.c
├── momentums.c
├── mushroom.c
├── parallel_train.c
├── robot.c
├── scaling_test.c
├── scaling_train.c
├── simple_test.c
├── simple_train.c
├── steepness_train.c
├── xor.data
├── xor_sample.cpp
├── xor_test.c
└── xor_train.c
├── format.sh
├── ignore.bii
├── lib
└── googletest
│ ├── .clang-format
│ ├── .gitignore
│ ├── .travis.yml
│ ├── BUILD.bazel
│ ├── CMakeLists.txt
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── README.md
│ ├── WORKSPACE
│ ├── appveyor.yml
│ ├── ci
│ ├── build-linux-bazel.sh
│ ├── build-platformio.sh
│ ├── env-linux.sh
│ ├── env-osx.sh
│ ├── get-nprocessors.sh
│ ├── install-linux.sh
│ ├── install-osx.sh
│ ├── install-platformio.sh
│ ├── log-config.sh
│ └── travis.sh
│ ├── googlemock
│ ├── CMakeLists.txt
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── README.md
│ ├── cmake
│ │ ├── gmock.pc.in
│ │ └── gmock_main.pc.in
│ ├── docs
│ │ ├── cheat_sheet.md
│ │ ├── cook_book.md
│ │ ├── for_dummies.md
│ │ └── gmock_faq.md
│ ├── include
│ │ └── gmock
│ │ │ ├── gmock-actions.h
│ │ │ ├── gmock-cardinalities.h
│ │ │ ├── gmock-function-mocker.h
│ │ │ ├── gmock-generated-actions.h
│ │ │ ├── gmock-generated-actions.h.pump
│ │ │ ├── gmock-generated-function-mockers.h
│ │ │ ├── gmock-generated-function-mockers.h.pump
│ │ │ ├── gmock-generated-matchers.h
│ │ │ ├── gmock-generated-matchers.h.pump
│ │ │ ├── gmock-matchers.h
│ │ │ ├── gmock-more-actions.h
│ │ │ ├── gmock-more-matchers.h
│ │ │ ├── gmock-nice-strict.h
│ │ │ ├── gmock-spec-builders.h
│ │ │ ├── gmock.h
│ │ │ └── internal
│ │ │ ├── custom
│ │ │ ├── README.md
│ │ │ ├── gmock-generated-actions.h
│ │ │ ├── gmock-generated-actions.h.pump
│ │ │ ├── gmock-matchers.h
│ │ │ └── gmock-port.h
│ │ │ ├── gmock-internal-utils.h
│ │ │ ├── gmock-port.h
│ │ │ └── gmock-pp.h
│ ├── scripts
│ │ ├── fuse_gmock_files.py
│ │ ├── generator
│ │ │ ├── LICENSE
│ │ │ ├── README
│ │ │ ├── README.cppclean
│ │ │ ├── cpp
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ast.py
│ │ │ │ ├── gmock_class.py
│ │ │ │ ├── gmock_class_test.py
│ │ │ │ ├── keywords.py
│ │ │ │ ├── tokenize.py
│ │ │ │ └── utils.py
│ │ │ └── gmock_gen.py
│ │ ├── gmock-config.in
│ │ ├── gmock_doctor.py
│ │ ├── upload.py
│ │ └── upload_gmock.py
│ ├── src
│ │ ├── gmock-all.cc
│ │ ├── gmock-cardinalities.cc
│ │ ├── gmock-internal-utils.cc
│ │ ├── gmock-matchers.cc
│ │ ├── gmock-spec-builders.cc
│ │ ├── gmock.cc
│ │ └── gmock_main.cc
│ └── test
│ │ ├── BUILD.bazel
│ │ ├── gmock-actions_test.cc
│ │ ├── gmock-cardinalities_test.cc
│ │ ├── gmock-function-mocker_nc.cc
│ │ ├── gmock-function-mocker_nc_test.py
│ │ ├── gmock-function-mocker_test.cc
│ │ ├── gmock-generated-actions_test.cc
│ │ ├── gmock-generated-function-mockers_test.cc
│ │ ├── gmock-generated-matchers_test.cc
│ │ ├── gmock-internal-utils_test.cc
│ │ ├── gmock-matchers_test.cc
│ │ ├── gmock-more-actions_test.cc
│ │ ├── gmock-nice-strict_test.cc
│ │ ├── gmock-port_test.cc
│ │ ├── gmock-pp-string_test.cc
│ │ ├── gmock-pp_test.cc
│ │ ├── gmock-spec-builders_test.cc
│ │ ├── gmock_all_test.cc
│ │ ├── gmock_ex_test.cc
│ │ ├── gmock_leak_test.py
│ │ ├── gmock_leak_test_.cc
│ │ ├── gmock_link2_test.cc
│ │ ├── gmock_link_test.cc
│ │ ├── gmock_link_test.h
│ │ ├── gmock_output_test.py
│ │ ├── gmock_output_test_.cc
│ │ ├── gmock_output_test_golden.txt
│ │ ├── gmock_stress_test.cc
│ │ ├── gmock_test.cc
│ │ └── gmock_test_utils.py
│ ├── googletest
│ ├── CMakeLists.txt
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── README.md
│ ├── cmake
│ │ ├── Config.cmake.in
│ │ ├── gtest.pc.in
│ │ ├── gtest_main.pc.in
│ │ ├── internal_utils.cmake
│ │ └── libgtest.la.in
│ ├── docs
│ │ ├── advanced.md
│ │ ├── faq.md
│ │ ├── pkgconfig.md
│ │ ├── primer.md
│ │ ├── pump_manual.md
│ │ └── samples.md
│ ├── include
│ │ └── gtest
│ │ │ ├── gtest-death-test.h
│ │ │ ├── gtest-matchers.h
│ │ │ ├── gtest-message.h
│ │ │ ├── gtest-param-test.h
│ │ │ ├── gtest-printers.h
│ │ │ ├── gtest-spi.h
│ │ │ ├── gtest-test-part.h
│ │ │ ├── gtest-typed-test.h
│ │ │ ├── gtest.h
│ │ │ ├── gtest_pred_impl.h
│ │ │ ├── gtest_prod.h
│ │ │ └── internal
│ │ │ ├── custom
│ │ │ ├── README.md
│ │ │ ├── gtest-port.h
│ │ │ ├── gtest-printers.h
│ │ │ └── gtest.h
│ │ │ ├── gtest-death-test-internal.h
│ │ │ ├── gtest-filepath.h
│ │ │ ├── gtest-internal.h
│ │ │ ├── gtest-param-util.h
│ │ │ ├── gtest-port-arch.h
│ │ │ ├── gtest-port.h
│ │ │ ├── gtest-string.h
│ │ │ ├── gtest-type-util.h
│ │ │ └── gtest-type-util.h.pump
│ ├── samples
│ │ ├── prime_tables.h
│ │ ├── sample1.cc
│ │ ├── sample1.h
│ │ ├── sample10_unittest.cc
│ │ ├── sample1_unittest.cc
│ │ ├── sample2.cc
│ │ ├── sample2.h
│ │ ├── sample2_unittest.cc
│ │ ├── sample3-inl.h
│ │ ├── sample3_unittest.cc
│ │ ├── sample4.cc
│ │ ├── sample4.h
│ │ ├── sample4_unittest.cc
│ │ ├── sample5_unittest.cc
│ │ ├── sample6_unittest.cc
│ │ ├── sample7_unittest.cc
│ │ ├── sample8_unittest.cc
│ │ └── sample9_unittest.cc
│ ├── scripts
│ │ ├── common.py
│ │ ├── fuse_gtest_files.py
│ │ ├── gen_gtest_pred_impl.py
│ │ ├── gtest-config.in
│ │ ├── pump.py
│ │ ├── release_docs.py
│ │ ├── upload.py
│ │ └── upload_gtest.py
│ ├── src
│ │ ├── gtest-all.cc
│ │ ├── gtest-death-test.cc
│ │ ├── gtest-filepath.cc
│ │ ├── gtest-internal-inl.h
│ │ ├── gtest-matchers.cc
│ │ ├── gtest-port.cc
│ │ ├── gtest-printers.cc
│ │ ├── gtest-test-part.cc
│ │ ├── gtest-typed-test.cc
│ │ ├── gtest.cc
│ │ └── gtest_main.cc
│ └── test
│ │ ├── BUILD.bazel
│ │ ├── googletest-break-on-failure-unittest.py
│ │ ├── googletest-break-on-failure-unittest_.cc
│ │ ├── googletest-catch-exceptions-test.py
│ │ ├── googletest-catch-exceptions-test_.cc
│ │ ├── googletest-color-test.py
│ │ ├── googletest-color-test_.cc
│ │ ├── googletest-death-test-test.cc
│ │ ├── googletest-death-test_ex_test.cc
│ │ ├── googletest-env-var-test.py
│ │ ├── googletest-env-var-test_.cc
│ │ ├── googletest-filepath-test.cc
│ │ ├── googletest-filter-unittest.py
│ │ ├── googletest-filter-unittest_.cc
│ │ ├── googletest-json-outfiles-test.py
│ │ ├── googletest-json-output-unittest.py
│ │ ├── googletest-list-tests-unittest.py
│ │ ├── googletest-list-tests-unittest_.cc
│ │ ├── googletest-listener-test.cc
│ │ ├── googletest-message-test.cc
│ │ ├── googletest-options-test.cc
│ │ ├── googletest-output-test-golden-lin.txt
│ │ ├── googletest-output-test.py
│ │ ├── googletest-output-test_.cc
│ │ ├── googletest-param-test-invalid-name1-test.py
│ │ ├── googletest-param-test-invalid-name1-test_.cc
│ │ ├── googletest-param-test-invalid-name2-test.py
│ │ ├── googletest-param-test-invalid-name2-test_.cc
│ │ ├── googletest-param-test-test.cc
│ │ ├── googletest-param-test-test.h
│ │ ├── googletest-param-test2-test.cc
│ │ ├── googletest-port-test.cc
│ │ ├── googletest-printers-test.cc
│ │ ├── googletest-shuffle-test.py
│ │ ├── googletest-shuffle-test_.cc
│ │ ├── googletest-test-part-test.cc
│ │ ├── googletest-test2_test.cc
│ │ ├── googletest-throw-on-failure-test.py
│ │ ├── googletest-throw-on-failure-test_.cc
│ │ ├── googletest-uninitialized-test.py
│ │ ├── googletest-uninitialized-test_.cc
│ │ ├── gtest-typed-test2_test.cc
│ │ ├── gtest-typed-test_test.cc
│ │ ├── gtest-typed-test_test.h
│ │ ├── gtest-unittest-api_test.cc
│ │ ├── gtest_all_test.cc
│ │ ├── gtest_assert_by_exception_test.cc
│ │ ├── gtest_environment_test.cc
│ │ ├── gtest_help_test.py
│ │ ├── gtest_help_test_.cc
│ │ ├── gtest_json_test_utils.py
│ │ ├── gtest_list_output_unittest.py
│ │ ├── gtest_list_output_unittest_.cc
│ │ ├── gtest_main_unittest.cc
│ │ ├── gtest_no_test_unittest.cc
│ │ ├── gtest_pred_impl_unittest.cc
│ │ ├── gtest_premature_exit_test.cc
│ │ ├── gtest_prod_test.cc
│ │ ├── gtest_repeat_test.cc
│ │ ├── gtest_skip_environment_check_output_test.py
│ │ ├── gtest_skip_in_environment_setup_test.cc
│ │ ├── gtest_skip_test.cc
│ │ ├── gtest_sole_header_test.cc
│ │ ├── gtest_stress_test.cc
│ │ ├── gtest_test_macro_stack_footprint_test.cc
│ │ ├── gtest_test_utils.py
│ │ ├── gtest_testbridge_test.py
│ │ ├── gtest_testbridge_test_.cc
│ │ ├── gtest_throw_on_failure_ex_test.cc
│ │ ├── gtest_unittest.cc
│ │ ├── gtest_xml_outfile1_test_.cc
│ │ ├── gtest_xml_outfile2_test_.cc
│ │ ├── gtest_xml_outfiles_test.py
│ │ ├── gtest_xml_output_unittest.py
│ │ ├── gtest_xml_output_unittest_.cc
│ │ ├── gtest_xml_test_utils.py
│ │ ├── production.cc
│ │ └── production.h
│ ├── library.json
│ └── platformio.ini
├── src
├── CMakeLists.txt
├── doublefann.c
├── fann.c
├── fann_cascade.c
├── fann_error.c
├── fann_io.c
├── fann_train.c
├── fann_train_data.c
├── fixedfann.c
├── floatfann.c
├── include
│ ├── CMakeLists.txt
│ ├── config.h
│ ├── doublefann.h
│ ├── fann.h
│ ├── fann_activation.h
│ ├── fann_cascade.h
│ ├── fann_cpp.h
│ ├── fann_data.h
│ ├── fann_data_cpp.h
│ ├── fann_error.h
│ ├── fann_internal.h
│ ├── fann_io.h
│ ├── fann_train.h
│ ├── fann_training_data_cpp.h
│ ├── fixedfann.h
│ ├── floatfann.h
│ ├── parallel_fann.h
│ └── parallel_fann.hpp
├── parallel_doublefann_cpp.cpp
├── parallel_fann.c
├── parallel_fann_cpp.cpp
└── parallel_floatfann_cpp.cpp
└── tests
├── CMakeLists.txt
├── fann_test.cpp
├── fann_test.h
├── fann_test_data.cpp
├── fann_test_data.h
├── fann_test_train.cpp
├── fann_test_train.h
└── main.cpp
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | BasedOnStyle: Google
3 | SortIncludes: 'false'
4 | ColumnLimit: 100
5 |
6 | ...
7 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | # this workflow will run ci
2 | name: ci
3 | on:
4 | push:
5 | branches:
6 | - alpha
7 | - beta
8 | - master
9 | workflow_dispatch:
10 | env:
11 | zzzz1234: 1
12 | jobs:
13 | job1:
14 | strategy:
15 | matrix:
16 | architecture:
17 | # - arm64
18 | - x64
19 | # - x86
20 | os:
21 | - macos-latest
22 | - ubuntu-latest
23 | # - windows-latest
24 | # base - .github/workflows/ci.yml - beg
25 | env:
26 | CI_MATRIX_NAME: >
27 | ${{ matrix.architecture }}
28 | ${{ matrix.os }}
29 | CI_WORKFLOW_NAME: >
30 | ${{ github.workflow }}
31 | - ${{ github.event_name }}
32 | - ${{ github.event.inputs.workflow_dispatch_name }}
33 | - ${{ github.ref_name }}
34 | name: >
35 | ${{ matrix.architecture }}
36 | ${{ matrix.os }}
37 | runs-on: ${{ matrix.os }}
38 | steps:
39 | - run: echo "$(date -u +"%Y-%m-%d %TZ") - ${{ env.CI_WORKFLOW_NAME }}" # "
40 | # disable autocrlf in windows
41 | - run: git config --global core.autocrlf false
42 | # https://github.com/actions/checkout
43 | - uses: actions/checkout@v3
44 | # run nodejs coverages and tests
45 | - run: sh ./ci.sh
46 | # base - .github/workflows/ci.yml - end
47 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.cbp
2 | *.sdf
3 | *.suo
4 | *.user
5 | *.opensdf
6 | ipch
7 | Debug
8 | Release
9 | Makefile
10 | CMakeFiles
11 | CMakeCache.txt
12 | CPackConfig.cmake
13 | CPackSourceConfig.cmake
14 | cmake_install.cmake
15 | .cmake/
16 | fann-config.cmake
17 | fann.pc
18 | install_manifest.txt
19 | *~
20 | *.sln
21 | *.suo
22 | *.filters
23 | *.vcxproj
24 | *.a
25 | *.so
26 | libfann.so*
27 | libdoublefann.so*
28 | libfixedfann.so*
29 | libfloatfann.so*
30 | tests/fann_tests
31 | Testing/
32 | generated/
33 | tmpFile
34 | tmpfile
35 | cascade_train.net
36 | cascade_train2.net
37 | mushroom_float.net
38 | robot_float.net
39 | scaling.net
40 |
41 | /VS2010/.vs/
42 | /bin/
43 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/fann.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: cpp
4 |
5 | compiler:
6 | - gcc
7 |
8 | addons:
9 | apt:
10 | sources:
11 | - llvm-toolchain-precise
12 | - ubuntu-toolchain-r-test
13 | packages:
14 | - clang-3.7
15 | - g++-5
16 | - gcc-5
17 | install:
18 | - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
19 | - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
20 |
21 | before_script:
22 | - cmake .
23 |
24 | script:
25 | - make
26 | - ./tests/fann_tests
27 |
28 |
--------------------------------------------------------------------------------
/VS2010/cascade_train/cascade_train.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/gtest/gtest.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 |
--------------------------------------------------------------------------------
/VS2010/momentums/momentums.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/mushroom/mushroom.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/parallel_train/parallel_train.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/robot/robot.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/scaling_test/scaling_test.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/scaling_train/scaling_train.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/simple_train_double/simple_train_double.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/simple_train_float/simple_train_float.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/steepness_train/steepness_train.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/tests_float/tests_float.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/VS2010/xor_cpp_sample/xor_cpp_sample.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/xor_test_fixed/xor_test_fixed.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/xor_test_float/xor_test_float.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/VS2010/xor_train/xor_train.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/biicode.conf:
--------------------------------------------------------------------------------
1 | # Biicode configuration file
2 |
3 | [requirements]
4 | biicode/cmake: 3
5 | google/gtest: 10
6 |
7 | [parent]
8 | # The parent version of this block. Must match folder name. E.g.
9 | # user/block # No version number means not published yet
10 | # You can change it to publish to a different track, and change version, e.g.
11 | # user/block(track): 7
12 | lasote/fann: 0
13 |
14 | [paths]
15 | # Local directories to look for headers (within block)
16 | # /
17 | # include
18 | src
19 | src/include
20 |
21 |
22 | [dependencies]
23 | # Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=)
24 | # hello.h + hello_imp.cpp hello_imp2.cpp
25 | # *.h + *.cpp
26 |
27 | [mains]
28 | # Manual adjust of files that define an executable
29 | # !main.cpp # Do not build executable from this file
30 | # main2.cpp # Build it (it doesnt have a main() function, but maybe it includes it)
31 |
32 | [hooks]
33 | # These are defined equal to [dependencies],files names matching bii*stage*hook.py
34 | # will be launched as python scripts at stage = {post_process, clean}
35 | # CMakeLists.txt + bii/my_post_process1_hook.py bii_clean_hook.py
36 |
37 | [includes]
38 | gtest/gtest.h: google/gtest/include
39 |
40 | [data]
41 | # Manually define data files dependencies, that will be copied to bin for execution
42 | # By default they are copied to bin/user/block/... which should be taken into account
43 | # when loading from disk such data
44 | # image.cpp + image.jpg # code should write open("user/block/image.jpg")
45 |
46 |
--------------------------------------------------------------------------------
/bin/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | *.pdb
3 | *.exp
4 | *.ilk
--------------------------------------------------------------------------------
/ci.sh:
--------------------------------------------------------------------------------
1 | (set -e
2 | # windows
3 | case "$(uname)" in
4 | MINGW*)
5 | # cmd "/C ci.bat"
6 | exit
7 | ;;
8 | esac
9 | # linux and darwin
10 | cmake .
11 | make
12 | ./tests/fann_tests
13 | )
14 |
--------------------------------------------------------------------------------
/cmake/config.h.in:
--------------------------------------------------------------------------------
1 | /* Name of package */
2 | #cmakedefine PACKAGE "@PACKAGE@"
3 |
4 | /* Version number of package */
5 | #cmakedefine VERSION "@FANN_VERSION_STRING@"
6 |
7 | /* Define for the x86_64 CPU famyly */
8 | #cmakedefine X86_64 "@X86_64@"
9 |
--------------------------------------------------------------------------------
/cmake/fann-config.cmake.in:
--------------------------------------------------------------------------------
1 | # -*- cmake -*-
2 | #
3 | # fann-config.cmake(.in)
4 | #
5 |
6 | # Use the following variables to compile and link against FANN:
7 | # FANN_FOUND - True if FANN was found on your system
8 | # FANN_USE_FILE - The file making FANN usable
9 | # FANN_DEFINITIONS - Definitions needed to build with FANN
10 | # FANN_INCLUDE_DIR - Directory where fann.h can be found
11 | # FANN_INCLUDE_DIRS - List of directories of FANN and it's dependencies
12 | # FANN_LIBRARY - FANN library location
13 | # FANN_LIBRARIES - List of libraries to link against FANN library
14 | # FANN_LIBRARY_DIRS - List of directories containing FANN' libraries
15 | # FANN_ROOT_DIR - The base directory of FANN
16 | # FANN_VERSION_STRING - A human-readable string containing the version
17 | # FANN_VERSION_MAJOR - The major version of FANN
18 | # FANN_VERSION_MINOR - The minor version of FANN
19 | # FANN_VERSION_PATCH - The patch version of FANN
20 |
21 | @PACKAGE_INIT@
22 |
23 | set ( FANN_FOUND 1 )
24 | set ( FANN_USE_FILE "@FANN_USE_FILE@" )
25 |
26 | set ( FANN_DEFINITIONS "@FANN_DEFINITIONS@" )
27 | set ( FANN_INCLUDE_DIR "@FANN_INCLUDE_DIR@" )
28 | set ( FANN_INCLUDE_DIRS "@FANN_INCLUDE_DIRS@" )
29 | set ( FANN_LIBRARY "@FANN_LIBRARY@" )
30 | set ( FANN_LIBRARIES "@FANN_LIBRARIES@" )
31 | set ( FANN_LIBRARY_DIRS "@FANN_LIBRARY_DIRS@" )
32 | set ( FANN_ROOT_DIR "@FANN_ROOT_DIR@" )
33 |
34 | set ( FANN_VERSION_STRING "@FANN_VERSION_STRING@" )
35 | set ( FANN_VERSION_MAJOR "@FANN_VERSION_MAJOR@" )
36 | set ( FANN_VERSION_MINOR "@FANN_VERSION_MINOR@" )
37 | set ( FANN_VERSION_PATCH "@FANN_VERSION_PATCH@" )
38 |
39 |
--------------------------------------------------------------------------------
/cmake/fann-use.cmake:
--------------------------------------------------------------------------------
1 | # -*- cmake -*-
2 | #
3 | # fann-use.cmake
4 | #
5 |
6 | add_definitions ( ${FANN_DEFINITIONS} )
7 | include_directories ( ${FANN_INCLUDE_DIRS} )
8 | link_directories ( ${FANN_LIBRARY_DIRS} )
9 |
10 |
--------------------------------------------------------------------------------
/cmake/fann.pc.cmake:
--------------------------------------------------------------------------------
1 | prefix=@CMAKE_INSTALL_PREFIX@
2 | exec_prefix=@BIN_INSTALL_DIR@
3 | libdir=@LIB_INSTALL_DIR@
4 | includedir=@INCLUDE_INSTALL_DIR@
5 |
6 | Name: fann
7 | Description: Fast Artificial Neural Network Library
8 | Version: @VERSION@
9 | Libs: -L${libdir} -lm -lfann
10 | Cflags: -I${includedir}
11 |
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/example/Default.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/example/Default.css
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/example/Roman.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/example/Roman.css
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/example/Small.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/example/Small.css
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/example/showstyle.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/example/showstyle.html
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/examples.css:
--------------------------------------------------------------------------------
1 | @import URL(example/Default.css);
2 |
3 |
4 | .NDContent {
5 | color: #000000; background-color: #FFFFFF;
6 | padding: 15px 0;
7 | border-style: solid;
8 | border-width: 1px 3px 3px 1px;
9 | border-color: #c0c0c0 #808080 #808080 #c0c0c0;
10 | margin: 1em 5ex;
11 | -moz-border-radius: 12px;
12 | }
13 |
14 | .NDContent p,
15 | .NDContent li,
16 | .NDContent td,
17 | .NDMenu td,
18 | .NDSummary td,
19 | .NDIndex td {
20 | font-size: 10pt;
21 | line-height: normal;
22 | }
23 | .NDContent .CTopic {
24 | padding-bottom: 0;
25 | }
26 | .Prototype td {
27 | font: 10pt Courier New, monospace;
28 | }
29 | .NDIndex .IHeading {
30 | font-size: 16pt;
31 | }
32 |
33 |
34 | .NDMenu {
35 | font: 9pt Verdana, Arial, sans-serif;
36 | color: #000000; background-color: #E8E8E8;
37 | width: 27ex;
38 | padding: 10px 0;
39 | border-style: solid;
40 | border-width: 1px 3px 3px 1px;
41 | border-color: #808080 #606060 #606060 #808080;
42 | margin: 1em 0 1em 5ex;
43 | -moz-border-radius: 12px;
44 | }
45 |
46 |
47 | .NDFooter {
48 | font: 8pt Verdana, Arial, sans-serif;
49 | color: #909090; background-color: #E8E8E8;
50 | border-style: solid;
51 | border-width: 1px 3px 3px 1px;
52 | border-color: #808080 #606060 #606060 #808080;
53 | margin: 1em 0 1em 5ex;
54 | -moz-border-radius: 12px;
55 | }
56 | .NDFooter td {
57 | font-size: 8pt;
58 | padding: 0 2ex;
59 | }
60 |
61 | .NDFooter a:link,
62 | .NDFooter a:hover,
63 | .NDFooter a:visited { color: #909090 }
64 | .NDFooter a:active { color: #A00000 }
65 |
66 |
67 | .NDSummary {
68 | padding: 15px;
69 | border-style: solid;
70 | border-width: 1px 3px 3px 1px;
71 | border-color: #c0c0c0 #808080 #808080 #c0c0c0;
72 | margin: 1em 5ex;
73 | -moz-border-radius: 12px;
74 | }
75 |
76 | .NDSummary .Summary {
77 | margin-top: 0;
78 | }
79 |
80 |
81 | .NDIndex {
82 | color: #000000; background-color: #FFFFFF;
83 | padding: 15px;
84 | border-style: solid;
85 | border-width: 1px 3px 3px 1px;
86 | border-color: #c0c0c0 #808080 #808080 #c0c0c0;
87 | margin: 1em 5ex;
88 | -moz-border-radius: 12px;
89 | }
90 |
91 |
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/background.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/leftside.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/leftside.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/logo.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/overbody.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/overbody.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/overbodybg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/overbodybg.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/overleftmargin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/overleftmargin.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/overmenu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/overmenu.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/overmenubg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/overmenubg.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/header/rightside.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/header/rightside.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/menu/about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/menu/about.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/menu/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/menu/background.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/menu/bottomleft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/menu/bottomleft.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/menu/bottomright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/menu/bottomright.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/menu/community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/menu/community.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/menu/customizing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/menu/customizing.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/images/menu/using.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Help/images/menu/using.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/javascript/BrowserStyles.js:
--------------------------------------------------------------------------------
1 |
2 | //
3 | // Browser Styles
4 | // ____________________________________________________________________________
5 |
6 | var agt=navigator.userAgent.toLowerCase();
7 | var browserType;
8 | var browserVer;
9 |
10 | if (agt.indexOf("opera") != -1)
11 | {
12 | browserType = "Opera";
13 |
14 | if (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1)
15 | { browserVer = "Opera5"; }
16 | else if (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1)
17 | { browserVer = "Opera6"; }
18 | else if (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1)
19 | { browserVer = "Opera7"; }
20 | }
21 |
22 | else if (agt.indexOf("khtml") != -1 || agt.indexOf("konq") != -1 || agt.indexOf("safari") != -1)
23 | {
24 | browserType = "KHTML";
25 | }
26 |
27 | else if (agt.indexOf("msie") != -1)
28 | {
29 | browserType = "IE";
30 |
31 | if (agt.indexOf("msie 4") != -1)
32 | { browserVer = "IE4"; }
33 | else if (agt.indexOf("msie 5") != -1)
34 | { browserVer = "IE5"; }
35 | else if (agt.indexOf("msie 6") != -1)
36 | { browserVer = "IE6"; }
37 | else if (agt.indexOf("msie 7") != -1)
38 | { browserVer = "IE7"; }
39 | }
40 |
41 | else if (agt.indexOf("gecko") != -1)
42 | {
43 | browserType = "Gecko";
44 | }
45 |
46 | // Opera already taken care of.
47 | else if (agt.indexOf("mozilla") != -1 && agt.indexOf("compatible") == -1 && agt.indexOf("spoofer") == -1 &&
48 | agt.indexOf("webtv") == -1 && agt.indexOf("hotjava") == -1)
49 | {
50 | browserType = "Netscape";
51 |
52 | if (agt.indexOf("mozilla/4") != -1)
53 | { browserVer = "Netscape4"; }
54 | }
55 |
56 |
57 | function OpeningBrowserTags()
58 | {
59 | if (browserType)
60 | {
61 | document.write('
');
62 |
63 | if (browserVer)
64 | { document.write('
'); }
65 | }
66 | };
67 |
68 | function ClosingBrowserTags()
69 | {
70 | if (browserType)
71 | {
72 | document.write('
');
73 |
74 | if (browserVer)
75 | { document.write('
'); }
76 | }
77 | };
78 |
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Help/javascript/PNGHandling.js:
--------------------------------------------------------------------------------
1 | // Parts derived from:
2 | // Opacity Displayer, Version 1.0
3 | // Copyright Michael Lovitt, 6/2002.
4 | // Distribute freely, but please leave this notice intact.
5 | // http://www.alistapart.com/articles/pngopacity/
6 |
7 | // Parts derived from:
8 | // Natural Docs
9 | // Copyright (C) 2003-2004 Greg Valure
10 | // http://www.naturaldocs.org/
11 |
12 |
13 | var pngTransform;
14 | var pngNormal;
15 |
16 | var agt=navigator.userAgent.toLowerCase();
17 |
18 | if (agt.indexOf("opera") != -1)
19 | {
20 | if ( (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1) &&
21 | agt.indexOf("mac") != -1)
22 | {
23 | pngNormal = 1;
24 | }
25 | else if (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1 ||
26 | agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1)
27 | {
28 | pngNormal = 1;
29 | }
30 | }
31 |
32 | else if (agt.indexOf("msie") != -1)
33 | {
34 | if (agt.indexOf("msie 5.5") != -1 || agt.indexOf("msie 6") != -1)
35 | {
36 | if (agt.indexOf("mac") != -1)
37 | { pngNormal = 1; }
38 | else if (agt.indexOf("win") != -1)
39 | { pngTransform = 1; };
40 | }
41 |
42 | else if (agt.indexOf("msie 5") != -1)
43 | {
44 | if (agt.indexOf("mac") != -1)
45 | { pngNormal = 1; };
46 | }
47 |
48 | else if (agt.indexOf("msie 7") != -1)
49 | { pngNormal = 1; }
50 | }
51 |
52 | else if (agt.indexOf("gecko") != -1)
53 | {
54 | pngNormal = 1;
55 | }
56 |
57 |
58 | function PNGGIF(strPath, intWidth, intHeight, strAlt, strID)
59 | {
60 | if (pngTransform)
61 | {
62 | document.write('');
63 | }
64 | else if (pngNormal)
65 | {
66 | document.write('
');
67 | }
68 | else
69 | {
70 | document.write('
');
71 | }
72 | };
73 |
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Info/HTMLTestCases.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Info/HTMLTestCases.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Info/images/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Info/images/Logo.png
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/JavaScript/GooglePrettify.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/JavaScript/GooglePrettify.js
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/JavaScript/NaturalDocs.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/JavaScript/NaturalDocs.js
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/License.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/License.txt
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/BinaryFile.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/BinaryFile.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/Base.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/Base.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/FramedHTML.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/FramedHTML.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/HTML.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/HTML.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/HTMLBase.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Builder/HTMLBase.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ClassHierarchy.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ClassHierarchy.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ClassHierarchy/Class.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ClassHierarchy/Class.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ClassHierarchy/File.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ClassHierarchy/File.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ConfigFile.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ConfigFile.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Constants.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Constants.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/DefineMembers.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/DefineMembers.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Error.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Error.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/File.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/File.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ImageReferenceTable.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ImageReferenceTable.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ImageReferenceTable/Reference.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ImageReferenceTable/Reference.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ImageReferenceTable/String.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ImageReferenceTable/String.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/ActionScript.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/ActionScript.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Ada.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Ada.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Advanced.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Advanced.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Advanced/Scope.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Advanced/Scope.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Advanced/ScopeChange.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Advanced/ScopeChange.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Base.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Base.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/CSharp.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/CSharp.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/PLSQL.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/PLSQL.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Pascal.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Pascal.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Perl.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Perl.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Prototype.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Prototype.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Prototype/Parameter.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Prototype/Parameter.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Simple.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Simple.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Tcl.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Languages/Tcl.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/LineReader.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/LineReader.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Menu.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Menu.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Menu/Entry.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Menu/Entry.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/NDMarkup.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/NDMarkup.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser/JavaDoc.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser/JavaDoc.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser/Native.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser/Native.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser/ParsedTopic.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Parser/ParsedTopic.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Project.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Project.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Project/ImageFile.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Project/ImageFile.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Project/SourceFile.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Project/SourceFile.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/ReferenceString.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/ReferenceString.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Settings.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Settings.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Settings/BuildTarget.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Settings/BuildTarget.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/Extension.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/Extension.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/File.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/File.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/Item.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/Item.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/ItemDefinition.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/ItemDefinition.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/WatchedFileDefinitions.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SourceDB/WatchedFileDefinitions.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/StatusMessage.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/StatusMessage.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolString.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolString.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/File.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/File.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/IndexElement.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/IndexElement.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/Reference.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/Reference.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/ReferenceTarget.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/ReferenceTarget.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/Symbol.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/Symbol.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/SymbolDefinition.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/SymbolTable/SymbolDefinition.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Topics.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Topics.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Topics/Type.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Topics/Type.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Modules/NaturalDocs/Version.pm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Modules/NaturalDocs/Version.pm
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/NaturalDocs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/NaturalDocs
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/NaturalDocs.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | set NaturalDocsParams=
4 |
5 | rem Shift and loop so we can get more than nine parameters.
6 | rem This is especially important if we have spaces in file names.
7 |
8 | :MORE
9 | if "%1"=="" goto NOMORE
10 | set NaturalDocsParams=%NaturalDocsParams% %1
11 | shift
12 | goto MORE
13 | :NOMORE
14 |
15 | perl NaturalDocs %NaturalDocsParams%
16 |
17 | set NaturalDocsParams=
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Styles/Default.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Styles/Default.css
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Styles/Roman.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Styles/Roman.css
--------------------------------------------------------------------------------
/docs/NaturalDocs-1.52/Styles/Small.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/docs/NaturalDocs-1.52/Styles/Small.css
--------------------------------------------------------------------------------
/docs/generate_docs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | SCRIPT_PATH=`dirname $0`
4 |
5 | ${SCRIPT_PATH}/NaturalDocs-1.52/NaturalDocs -r -i ${SCRIPT_PATH}/../src/include/ -o HTML ${SCRIPT_PATH}/html -p ${SCRIPT_PATH}/prj
--------------------------------------------------------------------------------
/docs/publish_docs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | SCRIPT_PATH=`dirname $0`
4 | GH_PAGES_PATH=${SCRIPT_PATH}/../../pages/fann/
5 |
6 | ${SCRIPT_PATH}/generate_docs.sh
7 |
8 | cp -a ${SCRIPT_PATH}/html/* ${GH_PAGES_PATH}/docs/
9 | cd ${GH_PAGES_PATH}
10 | git commit -a -m "Automated update of docs"
11 | git push origin gh-pages
--------------------------------------------------------------------------------
/examples/.gitignore:
--------------------------------------------------------------------------------
1 | cascade_train
2 | mushroom
3 | robot
4 | scaling_test
5 | scaling_train
6 | simple_test
7 | simple_train
8 | steepness_train
9 | xor_fixed.data
10 | xor_fixed.net
11 | xor_float.net
12 | xor_test
13 | xor_test_fixed
14 | xor_train
15 | cascade_train_debug
16 | xor_test_debug
17 | xor_test_fixed_debug
18 | xor_train_debug
19 |
--------------------------------------------------------------------------------
/examples/momentums.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA
18 | */
19 |
20 | #include
21 |
22 | #include "fann.h"
23 |
24 | int main()
25 | {
26 | const unsigned int num_layers = 3;
27 | const unsigned int num_neurons_hidden = 96;
28 | const float desired_error = (const float) 0.001;
29 | struct fann *ann;
30 | struct fann_train_data *train_data, *test_data;
31 |
32 | float momentum;
33 |
34 | train_data = fann_read_train_from_file("../datasets/robot.train");
35 | test_data = fann_read_train_from_file("../datasets/robot.test");
36 |
37 | for ( momentum = 0.0f; momentum < 0.7f; momentum += 0.1f )
38 | {
39 | printf("============= momentum = %f =============\n", momentum);
40 |
41 | ann = fann_create_standard(num_layers,
42 | train_data->num_input, num_neurons_hidden, train_data->num_output);
43 |
44 | fann_set_training_algorithm(ann, FANN_TRAIN_INCREMENTAL);
45 |
46 | fann_set_learning_momentum(ann, momentum);
47 |
48 | fann_train_on_data(ann, train_data, 2000, 500, desired_error);
49 |
50 | printf("MSE error on train data: %f\n", fann_test_data(ann, train_data));
51 | printf("MSE error on test data : %f\n", fann_test_data(ann, test_data));
52 |
53 | fann_destroy(ann);
54 | }
55 |
56 | fann_destroy_train(train_data);
57 | fann_destroy_train(test_data);
58 | return 0;
59 | }
60 |
--------------------------------------------------------------------------------
/examples/mushroom.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #include
21 |
22 | #include "fann.h"
23 |
24 | int main()
25 | {
26 | const unsigned int num_layers = 3;
27 | const unsigned int num_neurons_hidden = 32;
28 | const float desired_error = (const float) 0.0001;
29 | const unsigned int max_epochs = 300;
30 | const unsigned int epochs_between_reports = 10;
31 | struct fann *ann;
32 | struct fann_train_data *train_data, *test_data;
33 |
34 | unsigned int i = 0;
35 |
36 | printf("Creating network.\n");
37 |
38 | train_data = fann_read_train_from_file("../datasets/mushroom.train");
39 |
40 | ann = fann_create_standard(num_layers,
41 | train_data->num_input, num_neurons_hidden, train_data->num_output);
42 |
43 | printf("Training network.\n");
44 |
45 | fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
46 | fann_set_activation_function_output(ann, FANN_SIGMOID);
47 |
48 | /*fann_set_training_algorithm(ann, FANN_TRAIN_INCREMENTAL); */
49 |
50 | fann_train_on_data(ann, train_data, max_epochs, epochs_between_reports, desired_error);
51 |
52 | printf("Testing network.\n");
53 |
54 | test_data = fann_read_train_from_file("../datasets/mushroom.test");
55 |
56 | fann_reset_MSE(ann);
57 | for(i = 0; i < fann_length_train_data(test_data); i++)
58 | {
59 | fann_test(ann, test_data->input[i], test_data->output[i]);
60 | }
61 |
62 | printf("MSE error on test data: %f\n", fann_get_MSE(ann));
63 |
64 | printf("Saving network.\n");
65 |
66 | fann_save(ann, "mushroom_float.net");
67 |
68 | printf("Cleaning up.\n");
69 | fann_destroy_train(train_data);
70 | fann_destroy_train(test_data);
71 | fann_destroy(ann);
72 |
73 | return 0;
74 | }
75 |
--------------------------------------------------------------------------------
/examples/parallel_train.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #include "fann.h"
21 | #include "parallel_fann.h"
22 |
23 | int main(int argc, const char* argv[])
24 | {
25 | const unsigned int max_epochs = 1000;
26 | unsigned int num_threads = 1;
27 | struct fann_train_data *data;
28 | struct fann *ann;
29 | long before;
30 | float error;
31 | unsigned int i;
32 |
33 | if(argc == 2)
34 | num_threads = atoi(argv[1]);
35 |
36 | data = fann_read_train_from_file("../datasets/mushroom.train");
37 | ann = fann_create_standard(3, fann_num_input_train_data(data), 32, fann_num_output_train_data(data));
38 |
39 | fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
40 | fann_set_activation_function_output(ann, FANN_SIGMOID);
41 |
42 | before = GetTickCount();
43 | for(i = 1; i <= max_epochs; i++)
44 | {
45 | error = num_threads > 1 ? fann_train_epoch_irpropm_parallel(ann, data, num_threads) : fann_train_epoch(ann, data);
46 | printf("Epochs %8d. Current error: %.10f\n", i, error);
47 | }
48 | printf("ticks %d", GetTickCount()-before);
49 |
50 | fann_destroy(ann);
51 | fann_destroy_train(data);
52 |
53 | return 0;
54 | }
55 |
--------------------------------------------------------------------------------
/examples/robot.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #include
21 |
22 | #include "fann.h"
23 |
24 | int main()
25 | {
26 | const unsigned int num_layers = 3;
27 | const unsigned int num_neurons_hidden = 96;
28 | const float desired_error = (const float) 0.001;
29 | struct fann *ann;
30 | struct fann_train_data *train_data, *test_data;
31 |
32 | unsigned int i = 0;
33 |
34 | printf("Creating network.\n");
35 |
36 | train_data = fann_read_train_from_file("../datasets/robot.train");
37 |
38 | ann = fann_create_standard(num_layers,
39 | train_data->num_input, num_neurons_hidden, train_data->num_output);
40 |
41 | printf("Training network.\n");
42 |
43 | fann_set_training_algorithm(ann, FANN_TRAIN_INCREMENTAL);
44 | fann_set_learning_momentum(ann, 0.4f);
45 |
46 | fann_train_on_data(ann, train_data, 3000, 10, desired_error);
47 |
48 | printf("Testing network.\n");
49 |
50 | test_data = fann_read_train_from_file("../datasets/robot.test");
51 |
52 | fann_reset_MSE(ann);
53 | for(i = 0; i < fann_length_train_data(test_data); i++)
54 | {
55 | fann_test(ann, test_data->input[i], test_data->output[i]);
56 | }
57 | printf("MSE error on test data: %f\n", fann_get_MSE(ann));
58 |
59 | printf("Saving network.\n");
60 |
61 | fann_save(ann, "robot_float.net");
62 |
63 | printf("Cleaning up.\n");
64 | fann_destroy_train(train_data);
65 | fann_destroy_train(test_data);
66 | fann_destroy(ann);
67 |
68 | return 0;
69 | }
70 |
--------------------------------------------------------------------------------
/examples/scaling_test.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include "fann.h"
3 |
4 | int main( int argc, char** argv )
5 | {
6 | fann_type *calc_out;
7 | unsigned int i;
8 | int ret = 0;
9 | struct fann *ann;
10 | struct fann_train_data *data;
11 | printf("Creating network.\n");
12 | ann = fann_create_from_file("scaling.net");
13 | if(!ann)
14 | {
15 | printf("Error creating ann --- ABORTING.\n");
16 | return 0;
17 | }
18 | fann_print_connections(ann);
19 | fann_print_parameters(ann);
20 | printf("Testing network.\n");
21 | data = fann_read_train_from_file("../datasets/scaling.data");
22 | for(i = 0; i < fann_length_train_data(data); i++)
23 | {
24 | fann_reset_MSE(ann);
25 | fann_scale_input( ann, data->input[i] );
26 | calc_out = fann_run( ann, data->input[i] );
27 | fann_descale_output( ann, calc_out );
28 | printf("Result %f original %f error %f\n",
29 | calc_out[0], data->output[i][0],
30 | (float) fann_abs(calc_out[0] - data->output[i][0]));
31 | }
32 | printf("Cleaning up.\n");
33 | fann_destroy_train(data);
34 | fann_destroy(ann);
35 | return ret;
36 | }
37 |
--------------------------------------------------------------------------------
/examples/scaling_train.c:
--------------------------------------------------------------------------------
1 | #include "fann.h"
2 |
3 | int main( int argc, char** argv )
4 | {
5 | const unsigned int num_input = 3;
6 | const unsigned int num_output = 1;
7 | const unsigned int num_layers = 4;
8 | const unsigned int num_neurons_hidden = 5;
9 | const float desired_error = (const float) 0.0001;
10 | const unsigned int max_epochs = 5000;
11 | const unsigned int epochs_between_reports = 1000;
12 | struct fann_train_data * data = NULL;
13 | struct fann *ann = fann_create_standard(num_layers, num_input, num_neurons_hidden, num_neurons_hidden, num_output);
14 | fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
15 | fann_set_activation_function_output(ann, FANN_LINEAR);
16 | fann_set_training_algorithm(ann, FANN_TRAIN_RPROP);
17 | data = fann_read_train_from_file("../datasets/scaling.data");
18 | fann_set_scaling_params(
19 | ann,
20 | data,
21 | -1, /* New input minimum */
22 | 1, /* New input maximum */
23 | -1, /* New output minimum */
24 | 1); /* New output maximum */
25 |
26 | fann_scale_train( ann, data );
27 |
28 | fann_train_on_data(ann, data, max_epochs, epochs_between_reports, desired_error);
29 | fann_destroy_train( data );
30 | fann_save(ann, "scaling.net");
31 | fann_destroy(ann);
32 | return 0;
33 | }
34 |
--------------------------------------------------------------------------------
/examples/simple_test.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #include
21 | #include "floatfann.h"
22 |
23 | int main()
24 | {
25 | fann_type *calc_out;
26 | fann_type input[2];
27 |
28 | struct fann *ann = fann_create_from_file("xor_float.net");
29 |
30 | input[0] = -1;
31 | input[1] = 1;
32 | calc_out = fann_run(ann, input);
33 |
34 | printf("xor test (%f,%f) -> %f\n", input[0], input[1], calc_out[0]);
35 |
36 | fann_destroy(ann);
37 | return 0;
38 | }
39 |
--------------------------------------------------------------------------------
/examples/simple_train.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #include "fann.h"
21 |
22 | int main()
23 | {
24 | const unsigned int num_input = 2;
25 | const unsigned int num_output = 1;
26 | const unsigned int num_layers = 3;
27 | const unsigned int num_neurons_hidden = 3;
28 | const float desired_error = (const float) 0.001;
29 | const unsigned int max_epochs = 500000;
30 | const unsigned int epochs_between_reports = 1000;
31 |
32 | struct fann *ann = fann_create_standard(num_layers, num_input, num_neurons_hidden, num_output);
33 |
34 | fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
35 | fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC);
36 |
37 | fann_train_on_file(ann, "xor.data", max_epochs, epochs_between_reports, desired_error);
38 |
39 | fann_save(ann, "xor_float.net");
40 |
41 | fann_destroy(ann);
42 |
43 | return 0;
44 | }
45 |
--------------------------------------------------------------------------------
/examples/xor.data:
--------------------------------------------------------------------------------
1 | 4 2 1
2 | -1 -1
3 | -1
4 | -1 1
5 | 1
6 | 1 -1
7 | 1
8 | 1 1
9 | -1
10 |
--------------------------------------------------------------------------------
/format.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | find src -regex '.*\.\(cpp\|hpp\|c\|h\)' -exec clang-format -i {} \;
4 | find tests -regex '.*\.\(cpp\|hpp\|c\|h\)' -exec clang-format -i {} \;
5 |
--------------------------------------------------------------------------------
/ignore.bii:
--------------------------------------------------------------------------------
1 | bin/*
2 | VS2010/*
3 | lib/*
4 | cmake/*
--------------------------------------------------------------------------------
/lib/googletest/.clang-format:
--------------------------------------------------------------------------------
1 | # Run manually to reformat a file:
2 | # clang-format -i --style=file
3 | Language: Cpp
4 | BasedOnStyle: Google
5 |
--------------------------------------------------------------------------------
/lib/googletest/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore CI build directory
2 | build/
3 | xcuserdata
4 | cmake-build-debug/
5 | .idea/
6 | bazel-bin
7 | bazel-genfiles
8 | bazel-googletest
9 | bazel-out
10 | bazel-testlogs
11 | # python
12 | *.pyc
13 |
14 | # Visual Studio files
15 | .vs
16 | *.sdf
17 | *.opensdf
18 | *.VC.opendb
19 | *.suo
20 | *.user
21 | _ReSharper.Caches/
22 | Win32-Debug/
23 | Win32-Release/
24 | x64-Debug/
25 | x64-Release/
26 |
27 | # Ignore autoconf / automake files
28 | Makefile.in
29 | aclocal.m4
30 | configure
31 | build-aux/
32 | autom4te.cache/
33 | googletest/m4/libtool.m4
34 | googletest/m4/ltoptions.m4
35 | googletest/m4/ltsugar.m4
36 | googletest/m4/ltversion.m4
37 | googletest/m4/lt~obsolete.m4
38 | googlemock/m4
39 |
40 | # Ignore generated directories.
41 | googlemock/fused-src/
42 | googletest/fused-src/
43 |
44 | # macOS files
45 | .DS_Store
46 | googletest/.DS_Store
47 | googletest/xcode/.DS_Store
48 |
49 | # Ignore cmake generated directories and files.
50 | CMakeFiles
51 | CTestTestfile.cmake
52 | Makefile
53 | cmake_install.cmake
54 | googlemock/CMakeFiles
55 | googlemock/CTestTestfile.cmake
56 | googlemock/Makefile
57 | googlemock/cmake_install.cmake
58 | googlemock/gtest
59 | /bin
60 | /googlemock/gmock.dir
61 | /googlemock/gmock_main.dir
62 | /googlemock/RUN_TESTS.vcxproj.filters
63 | /googlemock/RUN_TESTS.vcxproj
64 | /googlemock/INSTALL.vcxproj.filters
65 | /googlemock/INSTALL.vcxproj
66 | /googlemock/gmock_main.vcxproj.filters
67 | /googlemock/gmock_main.vcxproj
68 | /googlemock/gmock.vcxproj.filters
69 | /googlemock/gmock.vcxproj
70 | /googlemock/gmock.sln
71 | /googlemock/ALL_BUILD.vcxproj.filters
72 | /googlemock/ALL_BUILD.vcxproj
73 | /lib
74 | /Win32
75 | /ZERO_CHECK.vcxproj.filters
76 | /ZERO_CHECK.vcxproj
77 | /RUN_TESTS.vcxproj.filters
78 | /RUN_TESTS.vcxproj
79 | /INSTALL.vcxproj.filters
80 | /INSTALL.vcxproj
81 | /googletest-distribution.sln
82 | /CMakeCache.txt
83 | /ALL_BUILD.vcxproj.filters
84 | /ALL_BUILD.vcxproj
85 |
--------------------------------------------------------------------------------
/lib/googletest/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Note: CMake support is community-based. The maintainers do not use CMake
2 | # internally.
3 |
4 | cmake_minimum_required(VERSION 2.8.8)
5 |
6 | if (POLICY CMP0048)
7 | cmake_policy(SET CMP0048 NEW)
8 | endif (POLICY CMP0048)
9 |
10 | project(googletest-distribution)
11 | set(GOOGLETEST_VERSION 1.10.0)
12 |
13 | if (CMAKE_VERSION VERSION_LESS "3.1")
14 | add_definitions(-std=c++11)
15 | else()
16 | set(CMAKE_CXX_STANDARD 11)
17 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
18 | if(NOT CYGWIN)
19 | set(CMAKE_CXX_EXTENSIONS OFF)
20 | endif()
21 | endif()
22 |
23 | enable_testing()
24 |
25 | include(CMakeDependentOption)
26 | include(GNUInstallDirs)
27 |
28 | #Note that googlemock target already builds googletest
29 | option(BUILD_GMOCK "Builds the googlemock subproject" ON)
30 | option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
31 |
32 | if(BUILD_GMOCK)
33 | add_subdirectory( googlemock )
34 | else()
35 | add_subdirectory( googletest )
36 | endif()
37 |
--------------------------------------------------------------------------------
/lib/googletest/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2008, Google Inc.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 | * Neither the name of Google Inc. nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/lib/googletest/WORKSPACE:
--------------------------------------------------------------------------------
1 | workspace(name = "com_google_googletest")
2 |
3 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
4 |
5 | # Abseil
6 | http_archive(
7 | name = "com_google_absl",
8 | urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"],
9 | strip_prefix = "abseil-cpp-master",
10 | )
11 |
12 | http_archive(
13 | name = "rules_cc",
14 | strip_prefix = "rules_cc-master",
15 | urls = ["https://github.com/bazelbuild/rules_cc/archive/master.zip"],
16 | )
17 |
18 | http_archive(
19 | name = "rules_python",
20 | strip_prefix = "rules_python-master",
21 | urls = ["https://github.com/bazelbuild/rules_python/archive/master.zip"],
22 | )
23 |
24 |
--------------------------------------------------------------------------------
/lib/googletest/ci/build-linux-bazel.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2017 Google Inc.
3 | # All Rights Reserved.
4 | #
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | set -e
33 |
34 | bazel version
35 | bazel build --curses=no //...:all
36 | bazel test --curses=no //...:all
37 | bazel test --curses=no //...:all --define absl=1
38 |
--------------------------------------------------------------------------------
/lib/googletest/ci/build-platformio.sh:
--------------------------------------------------------------------------------
1 | # run PlatformIO builds
2 | platformio run
3 |
--------------------------------------------------------------------------------
/lib/googletest/ci/env-linux.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2017 Google Inc.
3 | # All Rights Reserved.
4 | #
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | #
33 | # This file should be sourced, and not executed as a standalone script.
34 | #
35 |
36 | # TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}.
37 |
38 | if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
39 | if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
40 | if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi
41 | fi
42 |
--------------------------------------------------------------------------------
/lib/googletest/ci/env-osx.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2017 Google Inc.
3 | # All Rights Reserved.
4 | #
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | #
33 | # This file should be sourced, and not executed as a standalone script.
34 | #
35 |
36 | # TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}.
37 | #
38 |
39 | if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
40 | if [ "$CXX" = "clang++" ]; then
41 | # $PATH needs to be adjusted because the llvm tap doesn't install the
42 | # package to /usr/local/bin, etc, like the gcc tap does.
43 | # See: https://github.com/Homebrew/legacy-homebrew/issues/29733
44 | clang_version=3.9
45 | export PATH="/usr/local/opt/llvm@${clang_version}/bin:$PATH";
46 | fi
47 | fi
48 |
--------------------------------------------------------------------------------
/lib/googletest/ci/get-nprocessors.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2017 Google Inc.
3 | # All Rights Reserved.
4 | #
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | # This file is typically sourced by another script.
33 | # if possible, ask for the precise number of processors,
34 | # otherwise take 2 processors as reasonable default; see
35 | # https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization
36 | if [ -x /usr/bin/getconf ]; then
37 | NPROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
38 | else
39 | NPROCESSORS=2
40 | fi
41 |
42 | # as of 2017-09-04 Travis CI reports 32 processors, but GCC build
43 | # crashes if parallelized too much (maybe memory consumption problem),
44 | # so limit to 4 processors for the time being.
45 | if [ $NPROCESSORS -gt 4 ] ; then
46 | echo "$0:Note: Limiting processors to use by make from $NPROCESSORS to 4."
47 | NPROCESSORS=4
48 | fi
49 |
--------------------------------------------------------------------------------
/lib/googletest/ci/install-linux.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2017 Google Inc.
3 | # All Rights Reserved.
4 | #
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | set -eu
33 |
34 | if [ "${TRAVIS_OS_NAME}" != linux ]; then
35 | echo "Not a Linux build; skipping installation"
36 | exit 0
37 | fi
38 |
39 |
40 | if [ "${TRAVIS_SUDO}" = "true" ]; then
41 | echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | \
42 | sudo tee /etc/apt/sources.list.d/bazel.list
43 | curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
44 | sudo apt-get update && sudo apt-get install -y bazel gcc-4.9 g++-4.9 clang-3.9
45 | elif [ "${CXX}" = "clang++" ]; then
46 | # Use ccache, assuming $HOME/bin is in the path, which is true in the Travis build environment.
47 | ln -sf /usr/bin/ccache $HOME/bin/${CXX};
48 | ln -sf /usr/bin/ccache $HOME/bin/${CC};
49 | fi
50 |
--------------------------------------------------------------------------------
/lib/googletest/ci/install-osx.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2017 Google Inc.
3 | # All Rights Reserved.
4 | #
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | set -eu
33 |
34 | if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
35 | echo "Not a macOS build; skipping installation"
36 | exit 0
37 | fi
38 |
39 | brew update
40 | brew install ccache gcc@4.9
41 |
--------------------------------------------------------------------------------
/lib/googletest/ci/install-platformio.sh:
--------------------------------------------------------------------------------
1 | # install PlatformIO
2 | sudo pip install -U platformio
3 |
4 | # update PlatformIO
5 | platformio update
6 |
--------------------------------------------------------------------------------
/lib/googletest/ci/log-config.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2017 Google Inc.
3 | # All Rights Reserved.
4 | #
5 | #
6 | # Redistribution and use in source and binary forms, with or without
7 | # modification, are permitted provided that the following conditions are
8 | # met:
9 | #
10 | # * Redistributions of source code must retain the above copyright
11 | # notice, this list of conditions and the following disclaimer.
12 | # * Redistributions in binary form must reproduce the above
13 | # copyright notice, this list of conditions and the following disclaimer
14 | # in the documentation and/or other materials provided with the
15 | # distribution.
16 | # * Neither the name of Google Inc. nor the names of its
17 | # contributors may be used to endorse or promote products derived from
18 | # this software without specific prior written permission.
19 | #
20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 | set -e
33 |
34 | # ccache on OS X needs installation first
35 | # reset ccache statistics
36 | ccache --zero-stats
37 |
38 | echo PATH=${PATH}
39 |
40 | echo "Compiler configuration:"
41 | echo CXX=${CXX}
42 | echo CC=${CC}
43 | echo CXXFLAGS=${CXXFLAGS}
44 |
45 | echo "C++ compiler version:"
46 | ${CXX} --version || echo "${CXX} does not seem to support the --version flag"
47 | ${CXX} -v || echo "${CXX} does not seem to support the -v flag"
48 |
49 | echo "C compiler version:"
50 | ${CC} --version || echo "${CXX} does not seem to support the --version flag"
51 | ${CC} -v || echo "${CXX} does not seem to support the -v flag"
52 |
--------------------------------------------------------------------------------
/lib/googletest/ci/travis.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | set -evx
3 |
4 | . ci/get-nprocessors.sh
5 |
6 | # if possible, ask for the precise number of processors,
7 | # otherwise take 2 processors as reasonable default; see
8 | # https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization
9 | if [ -x /usr/bin/getconf ]; then
10 | NPROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
11 | else
12 | NPROCESSORS=2
13 | fi
14 | # as of 2017-09-04 Travis CI reports 32 processors, but GCC build
15 | # crashes if parallelized too much (maybe memory consumption problem),
16 | # so limit to 4 processors for the time being.
17 | if [ $NPROCESSORS -gt 4 ] ; then
18 | echo "$0:Note: Limiting processors to use by make from $NPROCESSORS to 4."
19 | NPROCESSORS=4
20 | fi
21 | # Tell make to use the processors. No preceding '-' required.
22 | MAKEFLAGS="j${NPROCESSORS}"
23 | export MAKEFLAGS
24 |
25 | env | sort
26 |
27 | # Set default values to OFF for these variables if not specified.
28 | : "${NO_EXCEPTION:=OFF}"
29 | : "${NO_RTTI:=OFF}"
30 | : "${COMPILER_IS_GNUCXX:=OFF}"
31 |
32 | mkdir build || true
33 | cd build
34 | cmake -Dgtest_build_samples=ON \
35 | -Dgtest_build_tests=ON \
36 | -Dgmock_build_tests=ON \
37 | -Dcxx_no_exception=$NO_EXCEPTION \
38 | -Dcxx_no_rtti=$NO_RTTI \
39 | -DCMAKE_COMPILER_IS_GNUCXX=$COMPILER_IS_GNUCXX \
40 | -DCMAKE_CXX_FLAGS=$CXX_FLAGS \
41 | -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
42 | ..
43 | make
44 | CTEST_OUTPUT_ON_FAILURE=1 make test
45 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This file contains a list of people who've made non-trivial
2 | # contribution to the Google C++ Mocking Framework project. People
3 | # who commit code to the project are encouraged to add their names
4 | # here. Please keep the list sorted by first names.
5 |
6 | Benoit Sigoure
7 | Bogdan Piloca
8 | Chandler Carruth
9 | Dave MacLachlan
10 | David Anderson
11 | Dean Sturtevant
12 | Gene Volovich
13 | Hal Burch
14 | Jeffrey Yasskin
15 | Jim Keller
16 | Joe Walnes
17 | Jon Wray
18 | Keir Mierle
19 | Keith Ray
20 | Kostya Serebryany
21 | Lev Makhlis
22 | Manuel Klimek
23 | Mario Tanev
24 | Mark Paskin
25 | Markus Heule
26 | Matthew Simmons
27 | Mike Bland
28 | Neal Norwitz
29 | Nermin Ozkiranartli
30 | Owen Carlsen
31 | Paneendra Ba
32 | Paul Menage
33 | Piotr Kaminski
34 | Russ Rufer
35 | Sverre Sundsdal
36 | Takeshi Yoshino
37 | Vadim Berman
38 | Vlad Losev
39 | Wolfgang Klier
40 | Zhanyong Wan
41 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2008, Google Inc.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 | * Neither the name of Google Inc. nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/README.md:
--------------------------------------------------------------------------------
1 | # Googletest Mocking (gMock) Framework
2 |
3 | ### Overview
4 |
5 | Google's framework for writing and using C++ mock classes. It can help you
6 | derive better designs of your system and write better tests.
7 |
8 | It is inspired by:
9 |
10 | * [jMock](http://www.jmock.org/),
11 | * [EasyMock](http://www.easymock.org/), and
12 | * [Hamcrest](http://code.google.com/p/hamcrest/),
13 |
14 | and designed with C++'s specifics in mind.
15 |
16 | gMock:
17 |
18 | - provides a declarative syntax for defining mocks,
19 | - can define partial (hybrid) mocks, which are a cross of real and mock
20 | objects,
21 | - handles functions of arbitrary types and overloaded functions,
22 | - comes with a rich set of matchers for validating function arguments,
23 | - uses an intuitive syntax for controlling the behavior of a mock,
24 | - does automatic verification of expectations (no record-and-replay needed),
25 | - allows arbitrary (partial) ordering constraints on function calls to be
26 | expressed,
27 | - lets a user extend it by defining new matchers and actions.
28 | - does not use exceptions, and
29 | - is easy to learn and use.
30 |
31 | Details and examples can be found here:
32 |
33 | * [gMock for Dummies](docs/for_dummies.md)
34 | * [Legacy gMock FAQ](docs/gmock_faq.md)
35 | * [gMock Cookbook](docs/cook_book.md)
36 | * [gMock Cheat Sheet](docs/cheat_sheet.md)
37 |
38 | Please note that code under scripts/generator/ is from the [cppclean
39 | project](http://code.google.com/p/cppclean/) and under the Apache
40 | License, which is different from Google Mock's license.
41 |
42 | Google Mock is a part of
43 | [Google Test C++ testing framework](http://github.com/google/googletest/) and a
44 | subject to the same requirements.
45 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/cmake/gmock.pc.in:
--------------------------------------------------------------------------------
1 | prefix=${pcfiledir}/../..
2 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
3 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
4 |
5 | Name: gmock
6 | Description: GoogleMock (without main() function)
7 | Version: @PROJECT_VERSION@
8 | URL: https://github.com/google/googletest
9 | Requires: gtest
10 | Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@
11 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
12 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/cmake/gmock_main.pc.in:
--------------------------------------------------------------------------------
1 | prefix=${pcfiledir}/../..
2 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
3 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
4 |
5 | Name: gmock_main
6 | Description: GoogleMock (with main() function)
7 | Version: @PROJECT_VERSION@
8 | URL: https://github.com/google/googletest
9 | Requires: gmock
10 | Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@
11 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
12 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/include/gmock/internal/custom/README.md:
--------------------------------------------------------------------------------
1 | # Customization Points
2 |
3 | The custom directory is an injection point for custom user configurations.
4 |
5 | ## Header `gmock-port.h`
6 |
7 | The following macros can be defined:
8 |
9 | ### Flag related macros:
10 |
11 | * `GMOCK_DECLARE_bool_(name)`
12 | * `GMOCK_DECLARE_int32_(name)`
13 | * `GMOCK_DECLARE_string_(name)`
14 | * `GMOCK_DEFINE_bool_(name, default_val, doc)`
15 | * `GMOCK_DEFINE_int32_(name, default_val, doc)`
16 | * `GMOCK_DEFINE_string_(name, default_val, doc)`
17 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h:
--------------------------------------------------------------------------------
1 | // This file was GENERATED by command:
2 | // pump.py gmock-generated-actions.h.pump
3 | // DO NOT EDIT BY HAND!!!
4 |
5 | // GOOGLETEST_CM0002 DO NOT DELETE
6 |
7 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
8 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
9 |
10 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
11 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump:
--------------------------------------------------------------------------------
1 | $$ -*- mode: c++; -*-
2 | $$ This is a Pump source file. Please use Pump to convert
3 | $$ it to callback-actions.h.
4 | $$
5 | $var max_callback_arity = 5
6 | $$}} This meta comment fixes auto-indentation in editors.
7 |
8 | // GOOGLETEST_CM0002 DO NOT DELETE
9 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
10 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
11 |
12 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_
13 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h:
--------------------------------------------------------------------------------
1 | // Copyright 2015, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Injection point for custom user configurations. See README for details
31 | //
32 | // GOOGLETEST_CM0002 DO NOT DELETE
33 |
34 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
35 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
36 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
37 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/include/gmock/internal/custom/gmock-port.h:
--------------------------------------------------------------------------------
1 | // Copyright 2015, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Injection point for custom user configurations. See README for details
31 | //
32 | // ** Custom implementation starts here **
33 |
34 | // GOOGLETEST_CM0002 DO NOT DELETE
35 |
36 | #ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
37 | #define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
38 |
39 | #endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_
40 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/scripts/generator/README:
--------------------------------------------------------------------------------
1 |
2 | The Google Mock class generator is an application that is part of cppclean.
3 | For more information about cppclean, visit http://code.google.com/p/cppclean/
4 |
5 | The mock generator requires Python 2.3.5 or later. If you don't have Python
6 | installed on your system, you will also need to install it. You can download
7 | Python from: http://www.python.org/download/releases/
8 |
9 | To use the Google Mock class generator, you need to call it
10 | on the command line passing the header file and class for which you want
11 | to generate a Google Mock class.
12 |
13 | Make sure to install the scripts somewhere in your path. Then you can
14 | run the program.
15 |
16 | gmock_gen.py header-file.h [ClassName]...
17 |
18 | If no ClassNames are specified, all classes in the file are emitted.
19 |
20 | To change the indentation from the default of 2, set INDENT in
21 | the environment. For example to use an indent of 4 spaces:
22 |
23 | INDENT=4 gmock_gen.py header-file.h ClassName
24 |
25 | This version was made from SVN revision 281 in the cppclean repository.
26 |
27 | Known Limitations
28 | -----------------
29 | Not all code will be generated properly. For example, when mocking templated
30 | classes, the template information is lost. You will need to add the template
31 | information manually.
32 |
33 | Not all permutations of using multiple pointers/references will be rendered
34 | properly. These will also have to be fixed manually.
35 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/scripts/generator/cpp/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/libfann/fann/1783cbf6239a597c4d29f694e227e22b8d4f4bf6/lib/googletest/googlemock/scripts/generator/cpp/__init__.py
--------------------------------------------------------------------------------
/lib/googletest/googlemock/scripts/generator/cpp/keywords.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Neal Norwitz
4 | # Portions Copyright 2007 Google Inc.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | """C++ keywords and helper utilities for determining keywords."""
19 |
20 | __author__ = 'nnorwitz@google.com (Neal Norwitz)'
21 |
22 |
23 | try:
24 | # Python 3.x
25 | import builtins
26 | except ImportError:
27 | # Python 2.x
28 | import __builtin__ as builtins
29 |
30 |
31 | if not hasattr(builtins, 'set'):
32 | # Nominal support for Python 2.3.
33 | from sets import Set as set
34 |
35 |
36 | TYPES = set('bool char int long short double float void wchar_t unsigned signed'.split())
37 | TYPE_MODIFIERS = set('auto register const inline extern static virtual volatile mutable'.split())
38 | ACCESS = set('public protected private friend'.split())
39 |
40 | CASTS = set('static_cast const_cast dynamic_cast reinterpret_cast'.split())
41 |
42 | OTHERS = set('true false asm class namespace using explicit this operator sizeof'.split())
43 | OTHER_TYPES = set('new delete typedef struct union enum typeid typename template'.split())
44 |
45 | CONTROL = set('case switch default if else return goto'.split())
46 | EXCEPTION = set('try catch throw'.split())
47 | LOOP = set('while do for break continue'.split())
48 |
49 | ALL = TYPES | TYPE_MODIFIERS | ACCESS | CASTS | OTHERS | OTHER_TYPES | CONTROL | EXCEPTION | LOOP
50 |
51 |
52 | def IsKeyword(token):
53 | return token in ALL
54 |
55 | def IsBuiltinType(token):
56 | if token in ('virtual', 'inline'):
57 | # These only apply to methods, they can't be types by themselves.
58 | return False
59 | return token in TYPES or token in TYPE_MODIFIERS
60 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/scripts/generator/cpp/utils.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2007 Neal Norwitz
4 | # Portions Copyright 2007 Google Inc.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | """Generic utilities for C++ parsing."""
19 |
20 | __author__ = 'nnorwitz@google.com (Neal Norwitz)'
21 |
22 |
23 | import sys
24 |
25 |
26 | # Set to True to see the start/end token indices.
27 | DEBUG = True
28 |
29 |
30 | def ReadFile(filename, print_error=True):
31 | """Returns the contents of a file."""
32 | try:
33 | fp = open(filename)
34 | try:
35 | return fp.read()
36 | finally:
37 | fp.close()
38 | except IOError:
39 | if print_error:
40 | print('Error reading %s: %s' % (filename, sys.exc_info()[1]))
41 | return None
42 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/scripts/generator/gmock_gen.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2008 Google Inc. All Rights Reserved.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | """Driver for starting up Google Mock class generator."""
18 |
19 | __author__ = 'nnorwitz@google.com (Neal Norwitz)'
20 |
21 | import os
22 | import sys
23 |
24 | if __name__ == '__main__':
25 | # Add the directory of this script to the path so we can import gmock_class.
26 | sys.path.append(os.path.dirname(__file__))
27 |
28 | from cpp import gmock_class
29 | # Fix the docstring in case they require the usage.
30 | gmock_class.__doc__ = gmock_class.__doc__.replace('gmock_class.py', __file__)
31 | gmock_class.main()
32 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/src/gmock-all.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | //
31 | // Google C++ Mocking Framework (Google Mock)
32 | //
33 | // This file #includes all Google Mock implementation .cc files. The
34 | // purpose is to allow a user to build Google Mock by compiling this
35 | // file alone.
36 |
37 | // This line ensures that gmock.h can be compiled on its own, even
38 | // when it's fused.
39 | #include "gmock/gmock.h"
40 |
41 | // The following lines pull in the real gmock *.cc files.
42 | #include "src/gmock-cardinalities.cc"
43 | #include "src/gmock-internal-utils.cc"
44 | #include "src/gmock-matchers.cc"
45 | #include "src/gmock-spec-builders.cc"
46 | #include "src/gmock.cc"
47 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/test/gmock-function-mocker_nc.cc:
--------------------------------------------------------------------------------
1 | #include "gmock/gmock.h"
2 |
3 | #include
4 | #include
5 |
6 | #if defined(TEST_MOCK_METHOD_INVALID_CONST_SPEC)
7 |
8 | struct Base {
9 | MOCK_METHOD(int, F, (), (onst));
10 | };
11 |
12 | #else
13 |
14 | // Sanity check - this should compile.
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/test/gmock-function-mocker_nc_test.py:
--------------------------------------------------------------------------------
1 | """Negative compilation tests for Google Mock macro MOCK_METHOD."""
2 |
3 | import os
4 | import sys
5 |
6 | IS_LINUX = os.name == "posix" and os.uname()[0] == "Linux"
7 | if not IS_LINUX:
8 | sys.stderr.write(
9 | "WARNING: Negative compilation tests are not supported on this platform")
10 | sys.exit(0)
11 |
12 | # Suppresses the 'Import not at the top of the file' lint complaint.
13 | # pylint: disable-msg=C6204
14 | from google3.testing.pybase import fake_target_util
15 | from google3.testing.pybase import googletest
16 |
17 | # pylint: enable-msg=C6204
18 |
19 |
20 | class GMockMethodNCTest(googletest.TestCase):
21 | """Negative compilation tests for MOCK_METHOD."""
22 |
23 | # The class body is intentionally empty. The actual test*() methods
24 | # will be defined at run time by a call to
25 | # DefineNegativeCompilationTests() later.
26 | pass
27 |
28 |
29 | # Defines a list of test specs, where each element is a tuple
30 | # (test name, list of regexes for matching the compiler errors).
31 | TEST_SPECS = [
32 | ("MOCK_METHOD_INVALID_CONST_SPEC",
33 | [r"onst cannot be recognized as a valid specification modifier"]),
34 | ]
35 |
36 | # Define a test method in GMockNCTest for each element in TEST_SPECS.
37 | fake_target_util.DefineNegativeCompilationTests(
38 | GMockMethodNCTest,
39 | "google3/third_party/googletest/googlemock/test/gmock-function-mocker_nc",
40 | "gmock-function-mocker_nc.o", TEST_SPECS)
41 |
42 | if __name__ == "__main__":
43 | googletest.main()
44 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/test/gmock-port_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | // Google Mock - a framework for writing C++ mock classes.
32 | //
33 | // This file tests the internal cross-platform support utilities.
34 |
35 | #include "gmock/internal/gmock-port.h"
36 | #include "gtest/gtest.h"
37 |
38 | // NOTE: if this file is left without tests for some reason, put a dummy
39 | // test here to make references to symbols in the gtest library and avoid
40 | // 'undefined symbol' linker errors in gmock_main:
41 |
42 | TEST(DummyTest, Dummy) {}
43 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/test/gmock_link2_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | // Google Mock - a framework for writing C++ mock classes.
32 | //
33 | // This file is for verifying that various Google Mock constructs do not
34 | // produce linker errors when instantiated in different translation units.
35 | // Please see gmock_link_test.h for details.
36 |
37 | #define LinkTest LinkTest2
38 |
39 | #include "test/gmock_link_test.h"
40 |
--------------------------------------------------------------------------------
/lib/googletest/googlemock/test/gmock_link_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | // Google Mock - a framework for writing C++ mock classes.
32 | //
33 | // This file is for verifying that various Google Mock constructs do not
34 | // produce linker errors when instantiated in different translation units.
35 | // Please see gmock_link_test.h for details.
36 |
37 | #define LinkTest LinkTest1
38 |
39 | #include "test/gmock_link_test.h"
40 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This file contains a list of people who've made non-trivial
2 | # contribution to the Google C++ Testing Framework project. People
3 | # who commit code to the project are encouraged to add their names
4 | # here. Please keep the list sorted by first names.
5 |
6 | Ajay Joshi
7 | Balázs Dán
8 | Bharat Mediratta
9 | Chandler Carruth
10 | Chris Prince
11 | Chris Taylor
12 | Dan Egnor
13 | Eric Roman
14 | Hady Zalek
15 | Jeffrey Yasskin
16 | Jói Sigurðsson
17 | Keir Mierle
18 | Keith Ray
19 | Kenton Varda
20 | Manuel Klimek
21 | Markus Heule
22 | Mika Raento
23 | Miklós Fazekas
24 | Pasi Valminen
25 | Patrick Hanna
26 | Patrick Riley
27 | Peter Kaminski
28 | Preston Jackson
29 | Rainer Klaffenboeck
30 | Russ Cox
31 | Russ Rufer
32 | Sean Mcafee
33 | Sigurður Ásgeirsson
34 | Tracy Bialik
35 | Vadim Berman
36 | Vlad Losev
37 | Zhanyong Wan
38 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2008, Google Inc.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 | * Neither the name of Google Inc. nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/cmake/Config.cmake.in:
--------------------------------------------------------------------------------
1 | @PACKAGE_INIT@
2 | include(CMakeFindDependencyMacro)
3 | if (@GTEST_HAS_PTHREAD@)
4 | set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@)
5 | find_dependency(Threads)
6 | endif()
7 |
8 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
9 | check_required_components("@project_name@")
10 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/cmake/gtest.pc.in:
--------------------------------------------------------------------------------
1 | prefix=${pcfiledir}/../..
2 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
3 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
4 |
5 | Name: gtest
6 | Description: GoogleTest (without main() function)
7 | Version: @PROJECT_VERSION@
8 | URL: https://github.com/google/googletest
9 | Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@
10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
11 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/cmake/gtest_main.pc.in:
--------------------------------------------------------------------------------
1 | prefix=${pcfiledir}/../..
2 | libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
3 | includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
4 |
5 | Name: gtest_main
6 | Description: GoogleTest (with main() function)
7 | Version: @PROJECT_VERSION@
8 | URL: https://github.com/google/googletest
9 | Requires: gtest
10 | Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@
11 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@
12 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/cmake/libgtest.la.in:
--------------------------------------------------------------------------------
1 | # libgtest.la - a libtool library file
2 | # Generated by libtool (GNU libtool) 2.4.6
3 |
4 | # Please DO NOT delete this file!
5 | # It is necessary for linking the library.
6 |
7 | # Names of this library.
8 | library_names='libgtest.so'
9 |
10 | # Is this an already installed library?
11 | installed=yes
12 |
13 | # Should we warn about portability when linking against -modules?
14 | shouldnotlink=no
15 |
16 | # Files to dlopen/dlpreopen
17 | dlopen=''
18 | dlpreopen=''
19 |
20 | # Directory that this library needs to be installed in:
21 | libdir='@CMAKE_INSTALL_FULL_LIBDIR@'
22 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/docs/samples.md:
--------------------------------------------------------------------------------
1 | # Googletest Samples {#samples}
2 |
3 | If you're like us, you'd like to look at
4 | [googletest samples.](https://github.com/google/googletest/tree/master/googletest/samples)
5 | The sample directory has a number of well-commented samples showing how to use a
6 | variety of googletest features.
7 |
8 | * Sample #1 shows the basic steps of using googletest to test C++ functions.
9 | * Sample #2 shows a more complex unit test for a class with multiple member
10 | functions.
11 | * Sample #3 uses a test fixture.
12 | * Sample #4 teaches you how to use googletest and `googletest.h` together to
13 | get the best of both libraries.
14 | * Sample #5 puts shared testing logic in a base test fixture, and reuses it in
15 | derived fixtures.
16 | * Sample #6 demonstrates type-parameterized tests.
17 | * Sample #7 teaches the basics of value-parameterized tests.
18 | * Sample #8 shows using `Combine()` in value-parameterized tests.
19 | * Sample #9 shows use of the listener API to modify Google Test's console
20 | output and the use of its reflection API to inspect test results.
21 | * Sample #10 shows use of the listener API to implement a primitive memory
22 | leak checker.
23 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/include/gtest/internal/custom/README.md:
--------------------------------------------------------------------------------
1 | # Customization Points
2 |
3 | The custom directory is an injection point for custom user configurations.
4 |
5 | ## Header `gtest.h`
6 |
7 | ### The following macros can be defined:
8 |
9 | * `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of
10 | `OsStackTraceGetterInterface`.
11 | * `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for `testing::TempDir()`. See
12 | `testing::TempDir` for semantics and signature.
13 |
14 | ## Header `gtest-port.h`
15 |
16 | The following macros can be defined:
17 |
18 | ### Flag related macros:
19 |
20 | * `GTEST_FLAG(flag_name)`
21 | * `GTEST_USE_OWN_FLAGFILE_FLAG_` - Define to 0 when the system provides its
22 | own flagfile flag parsing.
23 | * `GTEST_DECLARE_bool_(name)`
24 | * `GTEST_DECLARE_int32_(name)`
25 | * `GTEST_DECLARE_string_(name)`
26 | * `GTEST_DEFINE_bool_(name, default_val, doc)`
27 | * `GTEST_DEFINE_int32_(name, default_val, doc)`
28 | * `GTEST_DEFINE_string_(name, default_val, doc)`
29 |
30 | ### Logging:
31 |
32 | * `GTEST_LOG_(severity)`
33 | * `GTEST_CHECK_(condition)`
34 | * Functions `LogToStderr()` and `FlushInfoLog()` have to be provided too.
35 |
36 | ### Threading:
37 |
38 | * `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided.
39 | * `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if `Mutex` and `ThreadLocal`
40 | are already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)`
41 | and `GTEST_DEFINE_STATIC_MUTEX_(mutex)`
42 | * `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)`
43 | * `GTEST_LOCK_EXCLUDED_(locks)`
44 |
45 | ### Underlying library support features
46 |
47 | * `GTEST_HAS_CXXABI_H_`
48 |
49 | ### Exporting API symbols:
50 |
51 | * `GTEST_API_` - Specifier for exported symbols.
52 |
53 | ## Header `gtest-printers.h`
54 |
55 | * See documentation at `gtest/gtest-printers.h` for details on how to define a
56 | custom printer.
57 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/include/gtest/internal/custom/gtest-port.h:
--------------------------------------------------------------------------------
1 | // Copyright 2015, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Injection point for custom user configurations. See README for details
31 | //
32 | // ** Custom implementation starts here **
33 |
34 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
35 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
36 |
37 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_
38 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/include/gtest/internal/custom/gtest-printers.h:
--------------------------------------------------------------------------------
1 | // Copyright 2015, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // This file provides an injection point for custom printers in a local
31 | // installation of gTest.
32 | // It will be included from gtest-printers.h and the overrides in this file
33 | // will be visible to everyone.
34 | //
35 | // Injection point for custom user configurations. See README for details
36 | //
37 | // ** Custom implementation starts here **
38 |
39 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
40 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
41 |
42 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_
43 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/include/gtest/internal/custom/gtest.h:
--------------------------------------------------------------------------------
1 | // Copyright 2015, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Injection point for custom user configurations. See README for details
31 | //
32 | // ** Custom implementation starts here **
33 |
34 | #ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
35 | #define GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
36 |
37 | #endif // GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
38 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/samples/sample1.h:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 |
32 | #ifndef GTEST_SAMPLES_SAMPLE1_H_
33 | #define GTEST_SAMPLES_SAMPLE1_H_
34 |
35 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1.
36 | int Factorial(int n);
37 |
38 | // Returns true if and only if n is a prime number.
39 | bool IsPrime(int n);
40 |
41 | #endif // GTEST_SAMPLES_SAMPLE1_H_
42 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/samples/sample2.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 |
32 | #include "sample2.h"
33 |
34 | #include
35 |
36 | // Clones a 0-terminated C string, allocating memory using new.
37 | const char* MyString::CloneCString(const char* a_c_string) {
38 | if (a_c_string == nullptr) return nullptr;
39 |
40 | const size_t len = strlen(a_c_string);
41 | char* const clone = new char[ len + 1 ];
42 | memcpy(clone, a_c_string, len + 1);
43 |
44 | return clone;
45 | }
46 |
47 | // Sets the 0-terminated C string this MyString object
48 | // represents.
49 | void MyString::Set(const char* a_c_string) {
50 | // Makes sure this works when c_string == c_string_
51 | const char* const temp = MyString::CloneCString(a_c_string);
52 | delete[] c_string_;
53 | c_string_ = temp;
54 | }
55 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/samples/sample4.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 |
32 | #include
33 |
34 | #include "sample4.h"
35 |
36 | // Returns the current counter value, and increments it.
37 | int Counter::Increment() {
38 | return counter_++;
39 | }
40 |
41 | // Returns the current counter value, and decrements it.
42 | // counter can not be less than 0, return 0 in this case
43 | int Counter::Decrement() {
44 | if (counter_ == 0) {
45 | return counter_;
46 | } else {
47 | return counter_--;
48 | }
49 | }
50 |
51 | // Prints the current counter value to STDOUT.
52 | void Counter::Print() const {
53 | printf("%d", counter_);
54 | }
55 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/samples/sample4.h:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | // A sample program demonstrating using Google C++ testing framework.
31 | #ifndef GTEST_SAMPLES_SAMPLE4_H_
32 | #define GTEST_SAMPLES_SAMPLE4_H_
33 |
34 | // A simple monotonic counter.
35 | class Counter {
36 | private:
37 | int counter_;
38 |
39 | public:
40 | // Creates a counter that starts at 0.
41 | Counter() : counter_(0) {}
42 |
43 | // Returns the current counter value, and increments it.
44 | int Increment();
45 |
46 | // Returns the current counter value, and decrements it.
47 | int Decrement();
48 |
49 | // Prints the current counter value to STDOUT.
50 | void Print() const;
51 | };
52 |
53 | #endif // GTEST_SAMPLES_SAMPLE4_H_
54 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/samples/sample4_unittest.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2005, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #include "sample4.h"
32 | #include "gtest/gtest.h"
33 |
34 | namespace {
35 | // Tests the Increment() method.
36 |
37 | TEST(Counter, Increment) {
38 | Counter c;
39 |
40 | // Test that counter 0 returns 0
41 | EXPECT_EQ(0, c.Decrement());
42 |
43 | // EXPECT_EQ() evaluates its arguments exactly once, so they
44 | // can have side effects.
45 |
46 | EXPECT_EQ(0, c.Increment());
47 | EXPECT_EQ(1, c.Increment());
48 | EXPECT_EQ(2, c.Increment());
49 |
50 | EXPECT_EQ(3, c.Decrement());
51 | }
52 |
53 | } // namespace
54 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/src/gtest-all.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | //
31 | // Google C++ Testing and Mocking Framework (Google Test)
32 | //
33 | // Sometimes it's desirable to build Google Test by compiling a single file.
34 | // This file serves this purpose.
35 |
36 | // This line ensures that gtest.h can be compiled on its own, even
37 | // when it's fused.
38 | #include "gtest/gtest.h"
39 |
40 | // The following lines pull in the real gtest *.cc files.
41 | #include "src/gtest.cc"
42 | #include "src/gtest-death-test.cc"
43 | #include "src/gtest-filepath.cc"
44 | #include "src/gtest-matchers.cc"
45 | #include "src/gtest-port.cc"
46 | #include "src/gtest-printers.cc"
47 | #include "src/gtest-test-part.cc"
48 | #include "src/gtest-typed-test.cc"
49 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/src/gtest_main.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | #include
31 | #include "gtest/gtest.h"
32 |
33 | #ifdef ARDUINO
34 | void setup() {
35 | testing::InitGoogleTest();
36 | }
37 |
38 | void loop() { RUN_ALL_TESTS(); }
39 |
40 | #else
41 |
42 | GTEST_API_ int main(int argc, char **argv) {
43 | printf("Running main() from %s\n", __FILE__);
44 | testing::InitGoogleTest(&argc, argv);
45 | return RUN_ALL_TESTS();
46 | }
47 | #endif
48 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/googletest-param-test-invalid-name1-test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2015, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #include "gtest/gtest.h"
32 |
33 | namespace {
34 | class DummyTest : public ::testing::TestWithParam {};
35 |
36 | TEST_P(DummyTest, Dummy) {
37 | }
38 |
39 | INSTANTIATE_TEST_SUITE_P(InvalidTestName,
40 | DummyTest,
41 | ::testing::Values("InvalidWithQuotes"),
42 | ::testing::PrintToStringParamName());
43 |
44 | } // namespace
45 |
46 | int main(int argc, char *argv[]) {
47 | testing::InitGoogleTest(&argc, argv);
48 | return RUN_ALL_TESTS();
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/googletest-param-test-invalid-name2-test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2015, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #include "gtest/gtest.h"
32 |
33 | namespace {
34 | class DummyTest : public ::testing::TestWithParam {};
35 |
36 | std::string StringParamTestSuffix(
37 | const testing::TestParamInfo& info) {
38 | return std::string(info.param);
39 | }
40 |
41 | TEST_P(DummyTest, Dummy) {
42 | }
43 |
44 | INSTANTIATE_TEST_SUITE_P(DuplicateTestNames,
45 | DummyTest,
46 | ::testing::Values("a", "b", "a", "c"),
47 | StringParamTestSuffix);
48 | } // namespace
49 |
50 | int main(int argc, char *argv[]) {
51 | testing::InitGoogleTest(&argc, argv);
52 | return RUN_ALL_TESTS();
53 | }
54 |
55 |
56 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/googletest-param-test-test.h:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // The Google C++ Testing and Mocking Framework (Google Test)
31 | //
32 | // This header file provides classes and functions used internally
33 | // for testing Google Test itself.
34 |
35 | #ifndef GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
36 | #define GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
37 |
38 | #include "gtest/gtest.h"
39 |
40 | // Test fixture for testing definition and instantiation of a test
41 | // in separate translation units.
42 | class ExternalInstantiationTest : public ::testing::TestWithParam {
43 | };
44 |
45 | // Test fixture for testing instantiation of a test in multiple
46 | // translation units.
47 | class InstantiationInMultipleTranslationUnitsTest
48 | : public ::testing::TestWithParam {
49 | };
50 |
51 | #endif // GTEST_TEST_GTEST_PARAM_TEST_TEST_H_
52 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/googletest-uninitialized-test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #include "gtest/gtest.h"
32 |
33 | TEST(DummyTest, Dummy) {
34 | // This test doesn't verify anything. We just need it to create a
35 | // realistic stage for testing the behavior of Google Test when
36 | // RUN_ALL_TESTS() is called without
37 | // testing::InitGoogleTest() being called first.
38 | }
39 |
40 | int main() {
41 | return RUN_ALL_TESTS();
42 | }
43 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest-typed-test2_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008 Google Inc.
2 | // All Rights Reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #include
32 |
33 | #include "test/gtest-typed-test_test.h"
34 | #include "gtest/gtest.h"
35 |
36 | #if GTEST_HAS_TYPED_TEST_P
37 |
38 | // Tests that the same type-parameterized test case can be
39 | // instantiated in different translation units linked together.
40 | // (ContainerTest is also instantiated in gtest-typed-test_test.cc.)
41 | INSTANTIATE_TYPED_TEST_SUITE_P(Vector, ContainerTest,
42 | testing::Types >);
43 |
44 | #endif // GTEST_HAS_TYPED_TEST_P
45 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_all_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | //
31 | // Tests for Google C++ Testing and Mocking Framework (Google Test)
32 | //
33 | // Sometimes it's desirable to build most of Google Test's own tests
34 | // by compiling a single file. This file serves this purpose.
35 | #include "test/googletest-filepath-test.cc"
36 | #include "test/googletest-message-test.cc"
37 | #include "test/googletest-options-test.cc"
38 | #include "test/googletest-port-test.cc"
39 | #include "test/googletest-test-part-test.cc"
40 | #include "test/gtest-typed-test2_test.cc"
41 | #include "test/gtest-typed-test_test.cc"
42 | #include "test/gtest_pred_impl_unittest.cc"
43 | #include "test/gtest_prod_test.cc"
44 | #include "test/gtest_skip_test.cc"
45 | #include "test/gtest_unittest.cc"
46 | #include "test/production.cc"
47 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_help_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2009, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | // This program is meant to be run by gtest_help_test.py. Do not run
32 | // it directly.
33 |
34 | #include "gtest/gtest.h"
35 |
36 | // When a help flag is specified, this program should skip the tests
37 | // and exit with 0; otherwise the following test will be executed,
38 | // causing this program to exit with a non-zero code.
39 | TEST(HelpFlagTest, ShouldNotBeRun) {
40 | ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified.";
41 | }
42 |
43 | #if GTEST_HAS_DEATH_TEST
44 | TEST(DeathTest, UsedByPythonScriptToDetectSupportForDeathTestsInThisBinary) {}
45 | #endif
46 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_list_output_unittest_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2018, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: david.schuldenfrei@gmail.com (David Schuldenfrei)
31 |
32 | // Unit test for Google Test's --gtest_list_tests and --gtest_output flag.
33 | //
34 | // A user can ask Google Test to list all tests that will run,
35 | // and have the output saved in a Json/Xml file.
36 | // The tests will not be run after listing.
37 | //
38 | // This program will be invoked from a Python unit test.
39 | // Don't run it directly.
40 |
41 | #include "gtest/gtest.h"
42 |
43 | TEST(FooTest, Test1) {}
44 |
45 | TEST(FooTest, Test2) {}
46 |
47 | int main(int argc, char **argv) {
48 | ::testing::InitGoogleTest(&argc, argv);
49 |
50 | return RUN_ALL_TESTS();
51 | }
52 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_main_unittest.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | #include "gtest/gtest.h"
32 |
33 | // Tests that we don't have to define main() when we link to
34 | // gtest_main instead of gtest.
35 |
36 | namespace {
37 |
38 | TEST(GTestMainTest, ShouldSucceed) {
39 | }
40 |
41 | } // namespace
42 |
43 | // We are using the main() function defined in gtest_main.cc, so we
44 | // don't define it here.
45 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_prod_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | //
31 | // Unit test for gtest_prod.h.
32 |
33 | #include "production.h"
34 | #include "gtest/gtest.h"
35 |
36 | // Tests that private members can be accessed from a TEST declared as
37 | // a friend of the class.
38 | TEST(PrivateCodeTest, CanAccessPrivateMembers) {
39 | PrivateCode a;
40 | EXPECT_EQ(0, a.x_);
41 |
42 | a.set_x(1);
43 | EXPECT_EQ(1, a.x_);
44 | }
45 |
46 | typedef testing::Test PrivateCodeFixtureTest;
47 |
48 | // Tests that private members can be accessed from a TEST_F declared
49 | // as a friend of the class.
50 | TEST_F(PrivateCodeFixtureTest, CanAccessPrivateMembers) {
51 | PrivateCode a;
52 | EXPECT_EQ(0, a.x_);
53 |
54 | a.set_x(2);
55 | EXPECT_EQ(2, a.x_);
56 | }
57 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_skip_environment_check_output_test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright 2019 Google LLC. All Rights Reserved.
4 | #
5 | # Redistribution and use in source and binary forms, with or without
6 | # modification, are permitted provided that the following conditions are
7 | # met:
8 | #
9 | # * Redistributions of source code must retain the above copyright
10 | # notice, this list of conditions and the following disclaimer.
11 | # * Redistributions in binary form must reproduce the above
12 | # copyright notice, this list of conditions and the following disclaimer
13 | # in the documentation and/or other materials provided with the
14 | # distribution.
15 | # * Neither the name of Google Inc. nor the names of its
16 | # contributors may be used to endorse or promote products derived from
17 | # this software without specific prior written permission.
18 | #
19 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 | """Tests Google Test's gtest skip in environment setup behavior.
31 |
32 | This script invokes gtest_skip_in_environment_setup_test_ and verifies its
33 | output.
34 | """
35 |
36 | import gtest_test_utils
37 |
38 | # Path to the gtest_skip_in_environment_setup_test binary
39 | EXE_PATH = gtest_test_utils.GetTestExecutablePath(
40 | 'gtest_skip_in_environment_setup_test')
41 |
42 | OUTPUT = gtest_test_utils.Subprocess([EXE_PATH]).output
43 |
44 |
45 | # Test.
46 | class SkipEntireEnvironmentTest(gtest_test_utils.TestCase):
47 |
48 | def testSkipEntireEnvironmentTest(self):
49 | self.assertIn('Skipping the entire environment', OUTPUT)
50 | self.assertNotIn('FAILED', OUTPUT)
51 |
52 |
53 | if __name__ == '__main__':
54 | gtest_test_utils.Main()
55 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_skip_in_environment_setup_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2019, Google LLC.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google LLC. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // This test verifies that skipping in the environment results in the
31 | // testcases being skipped.
32 |
33 | #include
34 | #include "gtest/gtest.h"
35 |
36 | class SetupEnvironment : public testing::Environment {
37 | public:
38 | void SetUp() override { GTEST_SKIP() << "Skipping the entire environment"; }
39 | };
40 |
41 | TEST(Test, AlwaysFails) { EXPECT_EQ(true, false); }
42 |
43 | int main(int argc, char **argv) {
44 | testing::InitGoogleTest(&argc, argv);
45 |
46 | testing::AddGlobalTestEnvironment(new SetupEnvironment());
47 |
48 | return RUN_ALL_TESTS();
49 | }
50 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_skip_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008 Google Inc.
2 | // All Rights Reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // Author: arseny.aprelev@gmail.com (Arseny Aprelev)
31 | //
32 |
33 | #include "gtest/gtest.h"
34 |
35 | using ::testing::Test;
36 |
37 | TEST(SkipTest, DoesSkip) {
38 | GTEST_SKIP();
39 | EXPECT_EQ(0, 1);
40 | }
41 |
42 | class Fixture : public Test {
43 | protected:
44 | void SetUp() override {
45 | GTEST_SKIP() << "skipping all tests for this fixture";
46 | }
47 | };
48 |
49 | TEST_F(Fixture, SkipsOneTest) {
50 | EXPECT_EQ(5, 7);
51 | }
52 |
53 | TEST_F(Fixture, SkipsAnotherTest) {
54 | EXPECT_EQ(99, 100);
55 | }
56 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_sole_header_test.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | //
31 | // This test verifies that it's possible to use Google Test by including
32 | // the gtest.h header file alone.
33 |
34 | #include "gtest/gtest.h"
35 |
36 | namespace {
37 |
38 | void Subroutine() {
39 | EXPECT_EQ(42, 42);
40 | }
41 |
42 | TEST(NoFatalFailureTest, ExpectNoFatalFailure) {
43 | EXPECT_NO_FATAL_FAILURE(;);
44 | EXPECT_NO_FATAL_FAILURE(SUCCEED());
45 | EXPECT_NO_FATAL_FAILURE(Subroutine());
46 | EXPECT_NO_FATAL_FAILURE({ SUCCEED(); });
47 | }
48 |
49 | TEST(NoFatalFailureTest, AssertNoFatalFailure) {
50 | ASSERT_NO_FATAL_FAILURE(;);
51 | ASSERT_NO_FATAL_FAILURE(SUCCEED());
52 | ASSERT_NO_FATAL_FAILURE(Subroutine());
53 | ASSERT_NO_FATAL_FAILURE({ SUCCEED(); });
54 | }
55 |
56 | } // namespace
57 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_testbridge_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2018, Google LLC.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 | // This program is meant to be run by gtest_test_filter_test.py. Do not run
32 | // it directly.
33 |
34 | #include "gtest/gtest.h"
35 |
36 | // These tests are used to detect if filtering is working. Only
37 | // 'TestThatSucceeds' should ever run.
38 |
39 | TEST(TestFilterTest, TestThatSucceeds) {}
40 |
41 | TEST(TestFilterTest, TestThatFails) {
42 | ASSERT_TRUE(false) << "This test should never be run.";
43 | }
44 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_xml_outfile1_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // gtest_xml_outfile1_test_ writes some xml via TestProperty used by
31 | // gtest_xml_outfiles_test.py
32 |
33 | #include "gtest/gtest.h"
34 |
35 | class PropertyOne : public testing::Test {
36 | protected:
37 | void SetUp() override { RecordProperty("SetUpProp", 1); }
38 | void TearDown() override { RecordProperty("TearDownProp", 1); }
39 | };
40 |
41 | TEST_F(PropertyOne, TestSomeProperties) {
42 | RecordProperty("TestSomeProperty", 1);
43 | }
44 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/gtest_xml_outfile2_test_.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2008, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | //
30 | // gtest_xml_outfile2_test_ writes some xml via TestProperty used by
31 | // gtest_xml_outfiles_test.py
32 |
33 | #include "gtest/gtest.h"
34 |
35 | class PropertyTwo : public testing::Test {
36 | protected:
37 | void SetUp() override { RecordProperty("SetUpProp", 2); }
38 | void TearDown() override { RecordProperty("TearDownProp", 2); }
39 | };
40 |
41 | TEST_F(PropertyTwo, TestSomeProperties) {
42 | RecordProperty("TestSomeProperty", 2);
43 | }
44 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/production.cc:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | //
31 | // This is part of the unit test for gtest_prod.h.
32 |
33 | #include "production.h"
34 |
35 | PrivateCode::PrivateCode() : x_(0) {}
36 |
--------------------------------------------------------------------------------
/lib/googletest/googletest/test/production.h:
--------------------------------------------------------------------------------
1 | // Copyright 2006, Google Inc.
2 | // All rights reserved.
3 | //
4 | // Redistribution and use in source and binary forms, with or without
5 | // modification, are permitted provided that the following conditions are
6 | // met:
7 | //
8 | // * Redistributions of source code must retain the above copyright
9 | // notice, this list of conditions and the following disclaimer.
10 | // * Redistributions in binary form must reproduce the above
11 | // copyright notice, this list of conditions and the following disclaimer
12 | // in the documentation and/or other materials provided with the
13 | // distribution.
14 | // * Neither the name of Google Inc. nor the names of its
15 | // contributors may be used to endorse or promote products derived from
16 | // this software without specific prior written permission.
17 | //
18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
30 | //
31 | // This is part of the unit test for gtest_prod.h.
32 |
33 | #ifndef GTEST_TEST_PRODUCTION_H_
34 | #define GTEST_TEST_PRODUCTION_H_
35 |
36 | #include "gtest/gtest_prod.h"
37 |
38 | class PrivateCode {
39 | public:
40 | // Declares a friend test that does not use a fixture.
41 | FRIEND_TEST(PrivateCodeTest, CanAccessPrivateMembers);
42 |
43 | // Declares a friend test that uses a fixture.
44 | FRIEND_TEST(PrivateCodeFixtureTest, CanAccessPrivateMembers);
45 |
46 | PrivateCode();
47 |
48 | int x() const { return x_; }
49 | private:
50 | void set_x(int an_x) { x_ = an_x; }
51 | int x_;
52 | };
53 |
54 | #endif // GTEST_TEST_PRODUCTION_H_
55 |
--------------------------------------------------------------------------------
/lib/googletest/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "googletest",
3 | "keywords": "unittest, unit, test, gtest, gmock",
4 | "description": "googletest is a testing framework developed by the Testing Technology team with Google's specific requirements and constraints in mind. No matter whether you work on Linux, Windows, or a Mac, if you write C++ code, googletest can help you. And it supports any kind of tests, not just unit tests.",
5 | "license": "BSD-3-Clause",
6 | "homepage": "https://github.com/google/googletest/blob/master/README.md",
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/google/googletest.git"
10 | },
11 | "version": "1.8.1",
12 | "frameworks": "arduino",
13 | "platforms": [
14 | "espressif32"
15 | ],
16 | "export": {
17 | "include": [
18 | "googlemock/include/*",
19 | "googlemock/src/*",
20 | "googletest/include/*",
21 | "googletest/src/*"
22 | ],
23 | "exclude": [
24 | "ci",
25 | "googlemock/build-aux",
26 | "googlemock/cmake",
27 | "googlemock/make",
28 | "googlemock/msvc",
29 | "googlemock/scripts",
30 | "googlemock/src/gmock-all.cc",
31 | "googlemock/src/gmock_main.cc",
32 | "googlemock/test",
33 | "googlemock/CMakeLists.txt",
34 | "googlemock/Makefile.am",
35 | "googlemock/configure.ac",
36 | "googletest/cmake",
37 | "googletest/codegear",
38 | "googletest/m4",
39 | "googletest/make",
40 | "googletest/msvc",
41 | "googletest/scripts",
42 | "googletest/src/gtest-all.cc",
43 | "googletest/src/gtest_main.cc",
44 | "googletest/test",
45 | "googletest/xcode",
46 | "googletest/CMakeLists.txt",
47 | "googletest/Makefile.am",
48 | "googletest/configure.ac"
49 | ]
50 | },
51 | "build": {
52 | "flags": [
53 | "-Igooglemock/include",
54 | "-Igooglemock",
55 | "-Igoogletest/include",
56 | "-Igoogletest"
57 | ]
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/googletest/platformio.ini:
--------------------------------------------------------------------------------
1 | ; PlatformIO Project Configuration File
2 | ;
3 | ; Build options: build flags, source filter
4 | ; Upload options: custom upload port, speed and extra flags
5 | ; Library options: dependencies, extra library storages
6 | ; Advanced options: extra scripting
7 | ;
8 | ; Please visit documentation for the other options and examples
9 | ; http://docs.platformio.org/page/projectconf.html
10 |
11 |
12 | [platformio]
13 | #src_dir = ./googlemock
14 | #src_dir = ./googletest
15 | src_dir = .
16 |
17 | [env:googletest_esp32]
18 | platform = espressif32
19 | board = esp32dev
20 | framework = arduino
21 | build_flags = -I./googletest/include -I./googletest
22 | src_filter = +<*> -<.git/> - - - - - - + +
23 | upload_speed = 921600
24 |
25 | [env:googlemock_esp32]
26 | platform = espressif32
27 | board = esp32dev
28 | framework = arduino
29 | build_flags = -I./googlemock/include -I./googletest/include -I./googletest -I./googlemock
30 | src_filter = +<*> -<.git/> - - - + + +
31 | upload_speed = 921600
32 |
--------------------------------------------------------------------------------
/src/doublefann.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | /* Easy way to allow for build of multiple binaries */
21 |
22 | #include "config.h"
23 | #include "doublefann.h"
24 |
25 | #include "fann.c"
26 | #include "fann_io.c"
27 | #include "fann_train.c"
28 | #include "fann_train_data.c"
29 | #include "fann_error.c"
30 | #include "fann_cascade.c"
31 | #include "parallel_fann.c"
32 |
--------------------------------------------------------------------------------
/src/fixedfann.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | /* Easy way to allow for build of multiple binaries */
21 |
22 | #include "config.h"
23 | #include "fixedfann.h"
24 |
25 | #include "fann.c"
26 | #include "fann_io.c"
27 | #include "fann_train.c"
28 | #include "fann_train_data.c"
29 | #include "fann_error.c"
30 | #include "fann_cascade.c"
31 |
--------------------------------------------------------------------------------
/src/floatfann.c:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | /* Easy way to allow for build of multiple binaries */
21 |
22 | #include "config.h"
23 | #include "floatfann.h"
24 |
25 | #include "fann.c"
26 | #include "fann_io.c"
27 | #include "fann_train.c"
28 | #include "fann_train_data.c"
29 | #include "fann_error.c"
30 | #include "fann_cascade.c"
31 | #include "parallel_fann.c"
32 |
--------------------------------------------------------------------------------
/src/include/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | ########### install files ###############
2 |
3 | IF(NOT OPENMP_FOUND OR DISABLE_PARALLEL_FANN)
4 | SET(PARALLEL_INCLUDES "")
5 | ELSE(NOT OPENMP_FOUND OR DISABLE_PARALLEL_FANN)
6 | SET(PARALLEL_INCLUDES parallel_fann.h parallel_fann.hpp)
7 | ENDIF(NOT OPENMP_FOUND OR DISABLE_PARALLEL_FANN)
8 |
9 | install (FILES fann.h doublefann.h fann_internal.h floatfann.h fann_data.h fixedfann.h fann_activation.h fann_cascade.h fann_error.h fann_train.h fann_io.h fann_cpp.h fann_data_cpp.h fann_training_data_cpp.h ${PARALLEL_INCLUDES} DESTINATION ${INCLUDE_INSTALL_DIR})
10 |
11 |
--------------------------------------------------------------------------------
/src/include/config.h:
--------------------------------------------------------------------------------
1 | /* Name of package */
2 | /* #undef PACKAGE */
3 |
4 | /* Version number of package */
5 | /* #undef VERSION */
6 |
7 | /* Define for the x86_64 CPU famyly */
8 | /* #undef X86_64 */
9 |
--------------------------------------------------------------------------------
/src/include/doublefann.h:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #ifndef __doublefann_h__
21 | #define __doublefann_h__
22 |
23 | typedef double fann_type;
24 |
25 | #undef DOUBLEFANN
26 | #define DOUBLEFANN
27 | #define FANNPRINTF "%.20e"
28 | #define FANNSCANF "%le"
29 |
30 | #define FANN_INCLUDE
31 | #include "fann.h"
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/src/include/fixedfann.h:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #ifndef __fixedfann_h__
21 | #define __fixedfann_h__
22 |
23 | typedef int fann_type;
24 |
25 | #undef FIXEDFANN
26 | #define FIXEDFANN
27 | #define FANNPRINTF "%d"
28 | #define FANNSCANF "%d"
29 |
30 | #define FANN_INCLUDE
31 | #include "fann.h"
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/src/include/floatfann.h:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | #ifndef __floatfann_h__
21 | #define __floatfann_h__
22 |
23 | typedef float fann_type;
24 |
25 | #undef FLOATFANN
26 | #define FLOATFANN
27 | #define FANNPRINTF "%.20e"
28 | #define FANNSCANF "%f"
29 |
30 | #define FANN_INCLUDE
31 | #include "fann.h"
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/src/include/parallel_fann.h:
--------------------------------------------------------------------------------
1 | /*
2 | * parallel_FANN.h
3 | *
4 | * Author: Alessandro Pietro Bardelli
5 | */
6 | #ifndef DISABLE_PARALLEL_FANN
7 | #ifndef PARALLEL_FANN_H_
8 | #define PARALLEL_FANN_H_
9 |
10 | #include "fann.h"
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 |
15 | #ifndef __cplusplus
16 | } /* to fool automatic indention engines */
17 | #endif
18 | #endif /* __cplusplus */
19 |
20 | #ifndef FIXEDFANN
21 | FANN_EXTERNAL float FANN_API fann_train_epoch_batch_parallel(struct fann *ann,
22 | struct fann_train_data *data,
23 | const unsigned int threadnumb);
24 |
25 | FANN_EXTERNAL float FANN_API fann_train_epoch_irpropm_parallel(struct fann *ann,
26 | struct fann_train_data *data,
27 | const unsigned int threadnumb);
28 |
29 | FANN_EXTERNAL float FANN_API fann_train_epoch_quickprop_parallel(struct fann *ann,
30 | struct fann_train_data *data,
31 | const unsigned int threadnumb);
32 |
33 | FANN_EXTERNAL float FANN_API fann_train_epoch_sarprop_parallel(struct fann *ann,
34 | struct fann_train_data *data,
35 | const unsigned int threadnumb);
36 |
37 | FANN_EXTERNAL float FANN_API fann_train_epoch_incremental_mod(struct fann *ann,
38 | struct fann_train_data *data);
39 |
40 | FANN_EXTERNAL float FANN_API fann_test_data_parallel(struct fann *ann, struct fann_train_data *data,
41 | const unsigned int threadnumb);
42 | #endif /* FIXEDFANN */
43 |
44 | #ifdef __cplusplus
45 | #ifndef __cplusplus
46 | /* to fool automatic indention engines */
47 | {
48 | #endif
49 | }
50 | #endif /* __cplusplus */
51 |
52 | #endif /* PARALLEL_FANN_H_ */
53 | #endif /* DISABLE_PARALLEL_FANN */
54 |
--------------------------------------------------------------------------------
/src/parallel_doublefann_cpp.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | /* Easy way to allow for build of multiple binaries */
21 |
22 | #ifndef DISABLE_PARALLEL_FANN
23 | #include "config.h"
24 | #include "doublefann.h"
25 |
26 | #include "parallel_fann_cpp.cpp"
27 | #endif /* DISABLE_PARALLEL_FANN */
28 |
--------------------------------------------------------------------------------
/src/parallel_floatfann_cpp.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Fast Artificial Neural Network Library (fann)
3 | Copyright (C) 2003-2016 Steffen Nissen (steffen.fann@gmail.com)
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) any later version.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Lesser General Public License for more details.
14 |
15 | You should have received a copy of the GNU Lesser General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 | */
19 |
20 | /* Easy way to allow for build of multiple binaries */
21 |
22 | #ifndef DISABLE_PARALLEL_FANN
23 | #include "config.h"
24 | #include "floatfann.h"
25 |
26 | #include "parallel_fann_cpp.cpp"
27 | #endif /* DISABLE_PARALLEL_FANN */
28 |
--------------------------------------------------------------------------------
/tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | project (fann_tests)
2 | include(CheckCXXCompilerFlag)
3 |
4 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/include)
5 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/googletest/include)
6 |
7 | if(NOT MSVC)
8 | CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
9 | CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
10 | CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
11 | if(COMPILER_SUPPORTS_CXX14)
12 | message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++14 support.")
13 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
14 | elseif(COMPILER_SUPPORTS_CXX11)
15 | message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++11 support.")
16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
17 | elseif(COMPILER_SUPPORTS_CXX0X)
18 | message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has C++0x support.")
19 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
20 | else()
21 | message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++0x, C++11 or C++14 support. FANN will still work with no problem, but the tests will not be able to compile.")
22 | return()
23 | endif()
24 | endif(NOT MSVC)
25 |
26 | ADD_EXECUTABLE(fann_tests main.cpp fann_test.cpp fann_test_data.cpp fann_test_train.cpp)
27 | target_link_libraries(fann_tests gtest doublefann)
28 |
--------------------------------------------------------------------------------
/tests/fann_test.h:
--------------------------------------------------------------------------------
1 | #ifndef FANN_FANN_TEST_H
2 | #define FANN_FANN_TEST_H
3 |
4 | #include "gtest/gtest.h"
5 |
6 | #include "doublefann.h"
7 | #include "fann_cpp.h"
8 |
9 | using namespace FANN;
10 |
11 | class FannTest : public testing::Test {
12 | protected:
13 | neural_net net;
14 | training_data data;
15 |
16 | void AssertCreateAndCopy(neural_net &net, unsigned int numLayers, const unsigned int *layers,
17 | unsigned int neurons, unsigned int connections);
18 |
19 | void AssertCreate(neural_net &net, unsigned int numLayers, const unsigned int *layers,
20 | unsigned int neurons, unsigned int connections);
21 |
22 | void AssertWeights(neural_net &net, fann_type min, fann_type max, fann_type avg);
23 |
24 | virtual void SetUp();
25 |
26 | virtual void TearDown();
27 | };
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/tests/fann_test_data.h:
--------------------------------------------------------------------------------
1 | #ifndef FANN_FANN_TEST_DATA_H
2 | #define FANN_FANN_TEST_DATA_H
3 |
4 | #include "gtest/gtest.h"
5 |
6 | #include "doublefann.h"
7 | #include "fann_cpp.h"
8 | #include "fann_test.h"
9 |
10 | class FannTestData : public FannTest {
11 | protected:
12 | unsigned int numData;
13 | unsigned int numInput;
14 | unsigned int numOutput;
15 | fann_type inputValue;
16 | fann_type outputValue;
17 |
18 | fann_type **inputData;
19 | fann_type **outputData;
20 |
21 | virtual void SetUp();
22 |
23 | virtual void TearDown();
24 |
25 | void AssertTrainData(FANN::training_data &trainingData, unsigned int numData,
26 | unsigned int numInput, unsigned int numOutput, fann_type inputValue,
27 | fann_type outputValue);
28 |
29 | void InitializeTrainDataStructure(unsigned int numData, unsigned int numInput,
30 | unsigned int numOutput, fann_type inputValue,
31 | fann_type outputValue, fann_type **inputData,
32 | fann_type **outputData);
33 | };
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/tests/fann_test_train.cpp:
--------------------------------------------------------------------------------
1 | #include "fann_test_train.h"
2 |
3 | using namespace std;
4 |
5 | void FannTestTrain::SetUp() { FannTest::SetUp(); }
6 |
7 | void FannTestTrain::TearDown() { FannTest::TearDown(); }
8 |
9 | TEST_F(FannTestTrain, TrainOnDateSimpleXor) {
10 | neural_net net(LAYER, 3, 2, 3, 1);
11 |
12 | data.set_train_data(4, 2, xorInput, 1, xorOutput);
13 | net.train_on_data(data, 100, 100, 0.001);
14 |
15 | EXPECT_LT(net.get_MSE(), 0.001);
16 | EXPECT_LT(net.test_data(data), 0.001);
17 | }
18 |
19 | TEST_F(FannTestTrain, TrainOnReLUSimpleXor) {
20 | neural_net net(LAYER, 3, 2, 3, 1);
21 |
22 | data.set_train_data(4, 2, xorInput, 1, xorOutput);
23 | net.set_activation_function_hidden(FANN::LINEAR_PIECE_RECT);
24 | net.set_activation_steepness_hidden(1.0);
25 | net.train_on_data(data, 100, 100, 0.001);
26 |
27 | EXPECT_LT(net.get_MSE(), 0.001);
28 | EXPECT_LT(net.test_data(data), 0.001);
29 | }
30 |
31 | TEST_F(FannTestTrain, TrainOnReLULeakySimpleXor) {
32 | neural_net net(LAYER, 3, 2, 3, 1);
33 |
34 | data.set_train_data(4, 2, xorInput, 1, xorOutput);
35 | net.set_activation_function_hidden(FANN::LINEAR_PIECE_RECT_LEAKY);
36 | net.set_activation_steepness_hidden(1.0);
37 | net.train_on_data(data, 100, 100, 0.001);
38 |
39 | EXPECT_LT(net.get_MSE(), 0.001);
40 | EXPECT_LT(net.test_data(data), 0.001);
41 | }
42 |
43 | TEST_F(FannTestTrain, TrainSimpleIncrementalXor) {
44 | neural_net net(LAYER, 3, 2, 3, 1);
45 |
46 | fann_type in_0[] = {0.0, 0.0};
47 | fann_type out_0[] = {0.0};
48 | fann_type in_1[] = {1.0, 0.0};
49 | fann_type out_1[] = {1.0};
50 | fann_type in_2[] = {0.0, 1.0};
51 | fann_type out_2[] = {1.0};
52 | fann_type in_3[] = {1.0, 1.0};
53 | fann_type out_3[] = {0.0};
54 | for (int i = 0; i < 100000; i++) {
55 | net.train((fann_type*)in_0, (fann_type*)out_0);
56 | net.train((fann_type*)in_1, (fann_type*)out_1);
57 | net.train((fann_type*)in_2, (fann_type*)out_2);
58 | net.train((fann_type*)in_3, (fann_type*)out_3);
59 | }
60 |
61 | EXPECT_LT(net.get_MSE(), 0.01);
62 | }
63 |
--------------------------------------------------------------------------------
/tests/fann_test_train.h:
--------------------------------------------------------------------------------
1 | #ifndef FANN_FANN_TEST_TRAIN_H
2 | #define FANN_FANN_TEST_TRAIN_H
3 |
4 | #include "fann_test.h"
5 |
6 | class FannTestTrain : public FannTest {
7 | protected:
8 | fann_type xorInput[8] = {0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0};
9 | fann_type xorOutput[4] = {0.0, 1.0, 1.0, 0.0};
10 |
11 | virtual void SetUp();
12 |
13 | virtual void TearDown();
14 | };
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/tests/main.cpp:
--------------------------------------------------------------------------------
1 | #include "gtest/gtest.h"
2 |
3 | int main(int argc, char **argv) {
4 | ::testing::InitGoogleTest(&argc, argv);
5 | return RUN_ALL_TESTS();
6 | }
--------------------------------------------------------------------------------