Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom photon fields / SOPHIA update #220

Open
wants to merge 1,387 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
1387 commits
Select commit Hold shift + click to select a range
2fe7c14
Implemented proper python iterators in SWIG for ModuleList and Partic…
adundovi Dec 12, 2017
7ceb96e
Python2 iterator fix in SWIG; simplify and reorganize SWIG file
adundovi Dec 12, 2017
fadc850
Changed web path of the data file
adundovi Dec 14, 2017
8056af5
Added option to disable data file download
TobiasWinchen Dec 15, 2017
e7e5f9e
Fixed bug in test of Sc-44 decay
TobiasWinchen Dec 15, 2017
4e62fa6
The textfiles for the new propagation module PropagationBP were created.
GilbertWilbert Oct 31, 2017
2908329
First version of the PropagationBP module without adaptive step size.
GilbertWilbert Nov 2, 2017
4a37c30
First version of the PropagationBP module without adaptive step size.
GilbertWilbert Nov 2, 2017
3ed1482
PropagationBP::process : The parameter passing of candidate was chang…
GilbertWilbert Nov 3, 2017
15ac581
Changes in the step size. This version without adaptive step size see…
GilbertWilbert Nov 7, 2017
e217740
Correction of an error in the time evaluation.
GilbertWilbert Nov 8, 2017
313388d
Designed a magnetic bottle as a MagneticField. This is just a provisi…
GilbertWilbert Nov 20, 2017
ed16351
Changed the magnetic bottle field to a phyical reasonable field, that…
GilbertWilbert Dec 2, 2017
687867b
ome test magnetic fields were added.
GilbertWilbert Jan 16, 2018
6cf4cb4
Updated ParticleCollector::process() method to accept the smart point…
adundovi Jan 25, 2018
781141a
Added setValue to the grid template
adundovi Jan 26, 2018
aa3d338
Build documentation with make doc, updated doxygen, added mainpage
TobiasWinchen Jan 29, 2018
fef9d1d
improve style
rafaelab Jan 29, 2018
4a0a0b3
fix comment
rafaelab Jan 29, 2018
4303991
style
rafaelab Jan 29, 2018
7ae2634
fix indentation
rafaelab Jan 29, 2018
06e0d5f
fix indentation
rafaelab Jan 29, 2018
faa8d4a
Merge branch 'master' of https://github.com/CRPropa/CRPropa3
rafaelab Jan 29, 2018
9616be3
added groups to doxygen doku
TobiasWinchen Jan 29, 2018
8b1b704
Auto gen doxygen and push via travis
TobiasWinchen Jan 30, 2018
29d6dc0
Fixed doxygen install in travis
TobiasWinchen Jan 30, 2018
171a707
Fixed directory in .travis.yml
TobiasWinchen Jan 30, 2018
abc7b9b
Fixed key permission in travis.yml
TobiasWinchen Jan 30, 2018
b394bb2
Fixed typo and old matrix element from previous test
TobiasWinchen Jan 30, 2018
2300d8e
Fixed git push command in travis
TobiasWinchen Jan 30, 2018
9c68e22
Fixed git push command
TobiasWinchen Jan 30, 2018
66dad1c
Use after_suces instead of deploy in travis.yml for deploydoxgen
TobiasWinchen Jan 30, 2018
9dd3bb8
Travis: Fixed typo, only push documentation in one task in matrix
TobiasWinchen Jan 30, 2018
637afe9
Travis: fix conditional
TobiasWinchen Jan 30, 2018
1a08242
Travis: Disable conditional
TobiasWinchen Jan 30, 2018
1bd1af1
Travis: Fixed git push command
TobiasWinchen Jan 30, 2018
77b1238
Travis, force push
TobiasWinchen Jan 30, 2018
7c217f8
Doxygen: Use mathjax to display dokumentation
TobiasWinchen Jan 30, 2018
27024e3
Added HDf5 to Doxygen
TobiasWinchen Jan 30, 2018
fff640c
Doxygen: Updated groups
TobiasWinchen Jan 30, 2018
7e23e7e
Doxygen: Allow old style multiline cpp as brief
TobiasWinchen Jan 30, 2018
37fe58f
Added missing class dokumentations
TobiasWinchen Jan 31, 2018
3f63ea8
Install also KISS logger
TobiasWinchen Jan 31, 2018
16a3d74
Doxygen: Fixed link to version
TobiasWinchen Jan 31, 2018
7928715
Remove ROOT Output, now in separate plugin. Closes #142
TobiasWinchen Jan 31, 2018
7f9da35
Make random failing test less likely to fail
TobiasWinchen Jan 31, 2018
d065a9d
Make HDF5 Structure visible in doxygen
TobiasWinchen Jan 31, 2018
29a68d2
Doxygen; -> Building Blocks
TobiasWinchen Jan 31, 2018
0a326a3
Propagate signal up to caller after interception
TobiasWinchen Jan 31, 2018
b8265bb
Revert HDF5 Output dataset name; add type as attribute to dataset
TobiasWinchen Jan 31, 2018
6a6ef2f
CRPropa can be imported without data files
adundovi Feb 1, 2018
dd020b7
Typo in previous commit. Fixed #166
adundovi Feb 1, 2018
f72e556
CRPropa2 support dropped everywhere, including CRPropa2Output. Closed…
adundovi Feb 1, 2018
d203bad
Added the official web site in README.md
adundovi Feb 1, 2018
785a888
Doh! Removed CRPropa2Output from CRPropa.h
adundovi Feb 1, 2018
edeb6a2
Allow or parallelization of less than 1000 candidates.
lukasmerten Feb 1, 2018
2b32b6a
Add macro definition for OMP schedule variables
lukasmerten Feb 1, 2018
951ed37
Allow for on runtime change of schedule type
lukasmerten Feb 1, 2018
8268c5b
Fixed execution of ModuleListe xecution with Source for new signal ha…
TobiasWinchen Feb 2, 2018
15baa4b
Fixed missing critical section in ModuleList
TobiasWinchen Feb 2, 2018
116a7ec
Resolved segfault in OMP
adundovi Feb 4, 2018
9457781
Merge branch 'OMP' of https://github.com/lukasmerten/CRPropa3 into lu…
adundovi Feb 4, 2018
f34b206
Merge branch 'lukasmerten-OMP'
adundovi Feb 4, 2018
f2e9e3a
put OMP_SCHEDULE in a #define macro
adundovi Feb 4, 2018
f5a02d5
The OMP_SCHEDULE option moved to CMake config, <c++11 compatibility f…
adundovi Feb 6, 2018
b2a0f2e
fix bug #172
rafaelab Feb 6, 2018
8861314
remove obsolete DeflectionCK alias
rafaelab Feb 7, 2018
01f1c27
Merge branch 'master' of https://github.com/CRPropa/CRPropa3 into Boris
GilbertWilbert Feb 26, 2018
2d083cc
Just doc strings and code prettifyng
adundovi Feb 27, 2018
954145b
Fixed unit in comment
TobiasWinchen Feb 27, 2018
2477e23
Correctly flush HDf5 file, added manual control to force flush after …
TobiasWinchen Feb 28, 2018
990ee6d
Add length and energy scale to hdf output
TobiasWinchen Feb 28, 2018
727357e
Added interface to HepPID particle names to python wrapper
TobiasWinchen Feb 28, 2018
ac3d6a2
Updated README
TobiasWinchen Mar 8, 2018
69e520c
Added missing hepid.i
TobiasWinchen Mar 8, 2018
fe3e207
Bugfix in ParticleCollector::getTrajectory
adundovi Mar 13, 2018
94b9a9c
Correction in the dipol field
adundovi Mar 14, 2018
024d69f
Fixed wrong implemented model due to different phi convention in PT11…
Mar 17, 2018
f457e8b
ParticleCollector: a (possible) fix for #181
adundovi Mar 19, 2018
1ab7a1f
Merge branch 'master' of github.com:CRPropa/CRPropa3
adundovi Mar 22, 2018
7ccfe5c
Updates on 1D photon output. Added 'gzip' functionality. Added one li…
avvliet Apr 4, 2018
17414e0
Fixed tabs and spaces.
avvliet Apr 4, 2018
be94557
Merge pull request #184 from CRPropa/1DPhotonOutputUpdates
adundovi Apr 7, 2018
d75ff23
Added new source geometry: SourceUniformHollowSphere with a test
adundovi Apr 12, 2018
613a2f5
Fix whitespace
TobiasWinchen Apr 3, 2018
c36e960
DINT: Force RedshiftDown to use more accurate method. Closes: #174
TobiasWinchen Apr 16, 2018
7b06aca
Added the module 'PropagationBP_step', which is the same as the Modul…
GilbertWilbert Apr 20, 2018
62f436c
ParticleCollector: a (possible) fix for #181
adundovi Mar 19, 2018
c210275
Updates on 1D photon output. Added 'gzip' functionality. Added one li…
avvliet Apr 4, 2018
32ef7b5
Fixed tabs and spaces.
avvliet Apr 4, 2018
143d446
Added new source geometry: SourceUniformHollowSphere with a test
adundovi Apr 12, 2018
daacf22
Fix whitespace
TobiasWinchen Apr 3, 2018
5ffa7a7
DINT: Force RedshiftDown to use more accurate method. Closes: #174
TobiasWinchen Apr 16, 2018
5950e2b
Fix another bug in PT11 implementation that only affects the BSS fiel…
Apr 19, 2018
50b89f9
Merge branch 'master' of github.com:CRPropa/CRPropa3
Apr 23, 2018
7740060
Added Geometry system with Plane, Sphere, and Box
TobiasWinchen May 4, 2018
01e6e8e
Add description to Geometry
TobiasWinchen May 7, 2018
c494f5c
Added ObserverFeature using Geometry, deprecate Large/Small Sphere
TobiasWinchen May 7, 2018
bb286f5
Added module RestrictToRegion
TobiasWinchen May 7, 2018
c4e9a38
Added comment
TobiasWinchen May 11, 2018
6236b40
Fix rotation of vector around 0 axis
TobiasWinchen May 17, 2018
c6b8a78
Fixed description of ParaialBox and removed general box stump
TobiasWinchen May 18, 2018
aab7f66
Added normal to surface definition
TobiasWinchen May 18, 2018
c8cf6a9
Link plugin with CRPropa and Python, Closes: #189
TobiasWinchen May 18, 2018
eb3ef18
Merge pull request #187 from TobiasWinchen/GeometrySystem
TobiasWinchen Jun 19, 2018
d2447ff
Travis:Disable doc push on pull-request
TobiasWinchen Jun 19, 2018
0b6057c
Travis: Fix if
TobiasWinchen Jun 19, 2018
b651670
Travis: ...
TobiasWinchen Jun 19, 2018
6a5b655
Travis again ...
TobiasWinchen Jun 19, 2018
6a440f1
Add storing+resetting of seed in RNG.
TobiasWinchen Jun 13, 2018
353d4f6
Store Random seeds in HDF5
TobiasWinchen Jun 14, 2018
b2fdb71
Store Random seeds in TextFiles
TobiasWinchen Jun 14, 2018
e132992
Store random seed base64 encoded
TobiasWinchen Jun 19, 2018
77b1c47
Report random seed on crashes due to unknown nucleus id in error stream
TobiasWinchen Jun 19, 2018
530d995
Use uint32_t as data type in Random generator instead of uint32 typed…
TobiasWinchen Jun 19, 2018
aca1b9d
Initialize random seed array C++98 compatible
TobiasWinchen Jun 19, 2018
db42c6b
eV was not defined in correct units; however this does not change res…
adundovi Jun 24, 2018
434c61c
haveElectrons flag was being treated as havePhotons
rafaelab Aug 16, 2018
4f47f0b
separate electrons and photons production
rafaelab Aug 16, 2018
ad48732
separate electrons and photons production
rafaelab Aug 16, 2018
5f27db4
Added .mailmap to merge contributor mails and names
TobiasWinchen Sep 7, 2018
14df0ef
Bug fix that caused the wrong parent particle at point of creation to…
avvliet Oct 4, 2018
03a69d5
Added some conveniance units
TobiasWinchen Sep 21, 2018
f12c9a4
Added contribution guidelines
TobiasWinchen Oct 13, 2018
ea848e6
Minor language fix on CONTRIBUTING.md
avvliet Oct 15, 2018
91210b8
Minor language change to CONTRIBUTING.md
avvliet Oct 15, 2018
66d9843
Merge pull request #194 from TobiasWinchen/Stor_random_seed
TobiasWinchen Oct 16, 2018
8384e7c
Add a modified JF12 Galactic magnetic field according to Kleimann et …
TimoSchorlepp Sep 21, 2018
becc197
Add deactivateOuterTransition() function to disable the spiral transi…
TimoSchorlepp Oct 12, 2018
3849f7c
Restructure code such that JF12FieldSolenoidal now inherits most meth…
TimoSchorlepp Oct 15, 2018
5aafa13
Add comments and doxygen entries, rename methods and variables for co…
TimoSchorlepp Oct 17, 2018
cb4c54c
Fixed some whitespace
TobiasWinchen Oct 18, 2018
aabffd2
Merge branch 'TimoSchorlepp-master'
TobiasWinchen Oct 18, 2018
1b4e145
Fail if textfile cannot be created
TobiasWinchen Oct 18, 2018
5205f40
Fail if hdf5 file cannot be created
TobiasWinchen Oct 18, 2018
623e35f
Use matrix feature
TobiasWinchen Oct 18, 2018
651a5a0
Added osx to matrix
TobiasWinchen Oct 18, 2018
9dd426c
Force x86_64 bit on apple.
TobiasWinchen Oct 18, 2018
ff9e5bd
Verbose build
TobiasWinchen Oct 18, 2018
cae9472
Use travis apt addon
TobiasWinchen Oct 18, 2018
957def9
Fix improt of header and double declaraton of alphabet in base64
TobiasWinchen Oct 18, 2018
5134034
Removed include guards from implementation
TobiasWinchen Oct 18, 2018
de8dd86
Base64 as class in crpropa namespace
TobiasWinchen Oct 18, 2018
a8daa7a
Implement Random seed storage routines outside of constraining ifdef …
TobiasWinchen Oct 18, 2018
f5d0732
Travis: Cache downloaded data file
TobiasWinchen Oct 18, 2018
bb0708c
Note usage of data from cache in travis log
TobiasWinchen Oct 18, 2018
fbb073c
Travis: change cache directory
TobiasWinchen Oct 19, 2018
564dc39
Travis: Do not break on ci failure for osx
TobiasWinchen Oct 19, 2018
5ba3980
Travis: Reduce verbosity of make. [ci skip]
TobiasWinchen Oct 19, 2018
9242fea
Updated googletest version
TobiasWinchen Oct 19, 2018
d2ea565
Added missing file for gtest
TobiasWinchen Oct 19, 2018
047d210
Added missign gtest files
TobiasWinchen Oct 19, 2018
3531186
Added test to nail down failures in osx travis build
TobiasWinchen Oct 19, 2018
2744e78
Remvoe fixed size of int array in HepPID
TobiasWinchen Oct 19, 2018
dde2a3e
Travis: do not try to push doc on private repos
TobiasWinchen Oct 19, 2018
362cff0
Added test for HepPID::charge
TobiasWinchen Oct 19, 2018
2438833
Init particle state variables in cosntructor
TobiasWinchen Oct 19, 2018
62b4620
Added missing variable name in particleState::setId header
TobiasWinchen Oct 19, 2018
5fc1900
Travis: Fix CRPropa data path and additional output for OSX builds
TobiasWinchen Oct 19, 2018
a53d6a7
Travis: enable build fail for osx
TobiasWinchen Oct 19, 2018
70f86cc
Add deprecation warning to PhotonOutput1D
TobiasWinchen Oct 19, 2018
26567b1
Update candidate creation state on PhotoDisintegration. Closes: #204
TobiasWinchen Oct 19, 2018
4a9b466
Travis: Restrict build and deploy of documentation to single runner
TobiasWinchen Oct 19, 2018
4614793
initial commit for massdistribution
Oct 23, 2018
dff9580
bugfix. Change folder name massdistribution
Oct 26, 2018
491ae60
Bug Fix: Azimuthal component of ArchimedeanSpiral
lukasmerten Nov 5, 2018
5be5c2b
remove massdistribution Pohl, preparation for pull request
Nov 6, 2018
4055b59
changes directory name, more consistens in Units, remove double loadi…
Nov 8, 2018
a274782
Added pow_integer template as replacement for pow(..., 2) etc.
TobiasWinchen Nov 9, 2018
d77c020
remove whitespace, move deklaretion, use unit deg, rename test, use c…
Nov 9, 2018
af70a77
Added PhotonOutput1D option to regular output and adjusted DINT and E…
avvliet Nov 9, 2018
32cc130
Check for matplotlib version 2.0.0+
TobiasWinchen Nov 9, 2018
92f4903
Fix writing of seed number as int instead of unsigned long in HDF5
TobiasWinchen Nov 9, 2018
8ad3eff
Fix trailing whitespace in checkNumpy
TobiasWinchen Nov 9, 2018
6bdbfc9
Merge branch 'master' of https://github.com/CRPropa/CRPropa3 into Int…
avvliet Nov 20, 2018
a7fec25
Removed PhotonOutput1D option from regular output.
avvliet Nov 22, 2018
5711b72
Small change in the text of PhotonOutput1D deprecation warning.
avvliet Nov 22, 2018
531f61c
Both output from PhotonOutput1D and from the new output can now be re…
avvliet Nov 23, 2018
c2357b4
Merge branch 'massdistribution' of https://github.com/JulienDoerner/C…
TobiasWinchen Nov 28, 2018
330f42e
add doxygen comments, put CustomDensity to examples
Nov 30, 2018
e037581
Fix usage of alt operators
TobiasWinchen Dec 4, 2018
b0348d1
Added missing include
TobiasWinchen Dec 4, 2018
b6cd692
Merge branch 'massdistribution' of https://github.com/JulienDoerner/C…
TobiasWinchen Dec 6, 2018
a504dc3
Some fixes of code appearance
TobiasWinchen Dec 6, 2018
539bd12
Use pow_integer in mass dsitribution for performance
TobiasWinchen Dec 6, 2018
66fd3b1
Disabled output in tests
TobiasWinchen Dec 6, 2018
d69ac51
Merge branch 'JulienDoerner-massdistribution'
TobiasWinchen Dec 6, 2018
4670cb3
changed grid spacing to Vector3d, add Test
Dec 7, 2018
c31829e
update documentation for TestVectorSpacing
Dec 7, 2018
82c5323
Merge pull request #215 from JulienDoerner/Spacing
TobiasWinchen Dec 18, 2018
871649f
Merge pull request #211 from CRPropa/IntegratedPhotonOutput
TobiasWinchen Dec 18, 2018
f911d7d
Ammended code style
TobiasWinchen Jan 7, 2019
14d21c8
Replace log(1+x)/exp(x)-1 with log1p(x)/expm1(x) to avoid loss of pre…
TobiasWinchen Jan 7, 2019
5b7ef26
Removed unused variable
TobiasWinchen Jan 7, 2019
8d30f19
Use pow_integer in cosmology
TobiasWinchen Jan 7, 2019
4c33674
Remove unused variable
TobiasWinchen Jan 7, 2019
a42907f
Reduce scope of variable
TobiasWinchen Jan 7, 2019
2b4d7a9
Reduce scope of variables
TobiasWinchen Jan 7, 2019
d2141b2
Fix serialization of model matrix
TobiasWinchen Jan 7, 2019
8d53d66
Avoid unnecssary assignment
TobiasWinchen Jan 7, 2019
a69fa56
Removed unnecessary branching
TobiasWinchen Jan 7, 2019
d036e86
Reduce scope of variable
TobiasWinchen Jan 7, 2019
3606df7
Some markdown format fixes
TobiasWinchen Jan 7, 2019
f906c5c
Amended coding style
TobiasWinchen Jan 7, 2019
2e09ddf
Added Boris push to current branch
reichherzerp Feb 5, 2019
1dc4cdd
Merged the relevant files from GilbertWilbert for the Boris push into…
reichherzerp Feb 5, 2019
db065f2
delete additional magnetic fields which were only implemented to test…
reichherzerp Feb 5, 2019
0410b8d
Modified the Boris push code to match the programming style of CRProp…
reichherzerp Feb 5, 2019
0ee0c0e
Add relevant tests for Boris push propagation, including tests for pr…
reichherzerp Feb 5, 2019
caf4b1f
extended test for protons in Boris push.
reichherzerp Feb 5, 2019
10a62da
Neutral particles can be propagated correctly now with the Propagatio…
reichherzerp Feb 5, 2019
361f71a
Optimized process function of Poris push for charged particles. Only …
reichherzerp Feb 5, 2019
20f2378
Test for the Boris push in a parallel background magnetic field, wher…
reichherzerp Feb 5, 2019
6a02b3f
Implementation of the adaptive Boris push in analogy to the adaptive …
reichherzerp Feb 6, 2019
2565ebc
Added Tests for the adaptive Boris push. Works as expected!
reichherzerp Feb 6, 2019
972e960
Renamed functions so that their purpose can be immediately seen.
reichherzerp Feb 6, 2019
ea72a91
Optimized while loop in adaptive Boris push. Calculate new step lengh…
reichherzerp Feb 7, 2019
8376bfd
Combined the adaptive Boris push with the Boris push algorithm with a…
reichherzerp Feb 7, 2019
5c4cad4
Bug Fix in errorEstimation: Changed 1/4 to 1/4. to get the correct va…
reichherzerp Feb 7, 2019
0477cae
Finalize get and set functions for the adaptive Boris push.
reichherzerp Feb 7, 2019
108b35d
Added tests for the constructior and for the thrown exceptions.
reichherzerp Feb 7, 2019
2fe3e58
Combined the two seperate modules of the Boris push into one module P…
reichherzerp Feb 7, 2019
12391ff
Overloaded the constructor of PropagationBP, so that both the adaptiv…
reichherzerp Feb 8, 2019
acaaee1
Test the default and overloaded constructor of the new Boris push mod…
reichherzerp Feb 8, 2019
1dabb59
Added test for the description of PropagationBP.
reichherzerp Feb 10, 2019
9f2940e
Test if step size is reduced correctly in the adaptive algorithm.
reichherzerp Feb 10, 2019
eeee14f
Comment all functions in PropagationBP and explain their parameters.
reichherzerp Feb 10, 2019
df89b7c
Update .mailmap
carmeloevoli Feb 10, 2019
1f79980
Test if the step size is increased and redused correctly according to r.
reichherzerp Feb 10, 2019
f9fb3bc
Update .mailmap
adundovi Feb 12, 2019
979aa08
Improved comments and naming based on commit commits.
reichherzerp Feb 14, 2019
50116fd
Removed the test where the discription of PropagationBP is tested bec…
reichherzerp Feb 14, 2019
3a8d5b6
Merge branch 'borisPush' of https://github.com/reichherzerp/CRPropa3 …
TobiasWinchen Feb 14, 2019
189b427
Fixed some whitespace
TobiasWinchen Feb 14, 2019
ff928b1
Amended coding style
TobiasWinchen Jan 7, 2019
e5de0d4
Merge branch 'reichherzerp-borisPush'
TobiasWinchen Feb 14, 2019
7cd452f
Doxygen: Enable dot; Closes: #221
TobiasWinchen Feb 14, 2019
00eebd1
Updated .mailmap
TobiasWinchen Feb 14, 2019
bd39f84
[skip ci] Updated .mailmap
TobiasWinchen Feb 15, 2019
afc9991
implement custom photon fields
MHoerbe Feb 18, 2019
1352f94
update SOPHIA
MHoerbe Feb 18, 2019
fb065ae
implement custom photon fields
MHoerbe Feb 18, 2019
9fba837
add photon field test
MHoerbe Feb 18, 2019
c48c402
add photon field test
MHoerbe Feb 18, 2019
8e96faf
change access of class data arrays
MHoerbe Feb 18, 2019
8310e35
solve conflict with master
MHoerbe Feb 18, 2019
d3c75b3
temporarily change download link to CRPropa-data fork for updated ver…
MHoerbe Feb 20, 2019
708c9ac
add path to CHECKSUM file in fork of CRPropa-data repository
MHoerbe Feb 20, 2019
dd6a814
add URB_Protheroe96 to photon field tests
MHoerbe Feb 21, 2019
1b6d657
- implement code reviews
MHoerbe Feb 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated googletest version
TobiasWinchen committed Oct 19, 2018
commit 9242feaea3df6dd1e6e13d910eab1aa8158923af
28 changes: 28 additions & 0 deletions libs/gtest/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright 2008, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7 changes: 7 additions & 0 deletions libs/gtest/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This folder contains the googletest library.

Version 1.8.1
https://github.com/google/googletest/blob/master/LICENSE



89 changes: 75 additions & 14 deletions libs/gtest/include/gtest/gtest-death-test.h
Original file line number Diff line number Diff line change
@@ -26,17 +26,17 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//
// Author: wan@google.com (Zhanyong Wan)
//
// The Google C++ Testing Framework (Google Test)
// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines the public API for death tests. It is
// #included by gtest.h so a user doesn't need to include this
// directly.
// GOOGLETEST_CM0001 DO NOT DELETE

#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H
#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H
#ifndef GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
#define GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_

#include "gtest/internal/gtest-death-test-internal.h"

@@ -51,6 +51,17 @@ GTEST_DECLARE_string_(death_test_style);

#if GTEST_HAS_DEATH_TEST

namespace internal {

// Returns a Boolean value indicating whether the caller is currently
// executing in the context of the death test child process. Tools such as
// Valgrind heap checkers may need this to modify their behavior in death
// tests. IMPORTANT: This is an internal utility. Using it may break the
// implementation of death tests. User code MUST NOT use it.
GTEST_API_ bool InDeathTestChild();

} // namespace internal

// The following macros are useful for writing death tests.

// Here's what happens when an ASSERT_DEATH* or EXPECT_DEATH* is
@@ -75,7 +86,7 @@ GTEST_DECLARE_string_(death_test_style);
// for (int i = 0; i < 5; i++) {
// EXPECT_DEATH(server.ProcessRequest(i),
// "Invalid request .* in ProcessRequest()")
// << "Failed to die on request " << i);
// << "Failed to die on request " << i;
// }
//
// ASSERT_EXIT(server.ExitNow(), ::testing::ExitedWithCode(0), "Exiting");
@@ -88,10 +99,11 @@ GTEST_DECLARE_string_(death_test_style);
//
// On the regular expressions used in death tests:
//
// GOOGLETEST_CM0005 DO NOT DELETE
// On POSIX-compliant systems (*nix), we use the <regex.h> library,
// which uses the POSIX extended regex syntax.
//
// On other platforms (e.g. Windows), we only support a simple regex
// On other platforms (e.g. Windows or Mac), we only support a simple regex
// syntax implemented as part of Google Test. This limited
// implementation should be enough most of the time when writing
// death tests; though it lacks many features you can find in PCRE
@@ -149,7 +161,7 @@ GTEST_DECLARE_string_(death_test_style);
// is rarely a problem as people usually don't put the test binary
// directory in PATH.
//
// TODO(wan@google.com): make thread-safe death tests search the PATH.
// FIXME: make thread-safe death tests search the PATH.

// Asserts that a given statement causes the program to exit, with an
// integer exit status that satisfies predicate, and emitting error output
@@ -187,9 +199,10 @@ class GTEST_API_ ExitedWithCode {
const int exit_code_;
};

# if !GTEST_OS_WINDOWS
# if !GTEST_OS_WINDOWS && !GTEST_OS_FUCHSIA
// Tests that an exit code describes an exit due to termination by a
// given signal.
// GOOGLETEST_CM0006 DO NOT DELETE
class GTEST_API_ KilledBySignal {
public:
explicit KilledBySignal(int signum);
@@ -245,10 +258,10 @@ class GTEST_API_ KilledBySignal {
# ifdef NDEBUG

# define EXPECT_DEBUG_DEATH(statement, regex) \
do { statement; } while (::testing::internal::AlwaysFalse())
GTEST_EXECUTE_STATEMENT_(statement, regex)

# define ASSERT_DEBUG_DEATH(statement, regex) \
do { statement; } while (::testing::internal::AlwaysFalse())
GTEST_EXECUTE_STATEMENT_(statement, regex)

# else

@@ -261,6 +274,54 @@ class GTEST_API_ KilledBySignal {
# endif // NDEBUG for EXPECT_DEBUG_DEATH
#endif // GTEST_HAS_DEATH_TEST

// This macro is used for implementing macros such as
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED on systems where
// death tests are not supported. Those macros must compile on such systems
// iff EXPECT_DEATH and ASSERT_DEATH compile with the same parameters on
// systems that support death tests. This allows one to write such a macro
// on a system that does not support death tests and be sure that it will
// compile on a death-test supporting system. It is exposed publicly so that
// systems that have death-tests with stricter requirements than
// GTEST_HAS_DEATH_TEST can write their own equivalent of
// EXPECT_DEATH_IF_SUPPORTED and ASSERT_DEATH_IF_SUPPORTED.
//
// Parameters:
// statement - A statement that a macro such as EXPECT_DEATH would test
// for program termination. This macro has to make sure this
// statement is compiled but not executed, to ensure that
// EXPECT_DEATH_IF_SUPPORTED compiles with a certain
// parameter iff EXPECT_DEATH compiles with it.
// regex - A regex that a macro such as EXPECT_DEATH would use to test
// the output of statement. This parameter has to be
// compiled but not evaluated by this macro, to ensure that
// this macro only accepts expressions that a macro such as
// EXPECT_DEATH would accept.
// terminator - Must be an empty statement for EXPECT_DEATH_IF_SUPPORTED
// and a return statement for ASSERT_DEATH_IF_SUPPORTED.
// This ensures that ASSERT_DEATH_IF_SUPPORTED will not
// compile inside functions where ASSERT_DEATH doesn't
// compile.
//
// The branch that has an always false condition is used to ensure that
// statement and regex are compiled (and thus syntactically correct) but
// never executed. The unreachable code macro protects the terminator
// statement from generating an 'unreachable code' warning in case
// statement unconditionally returns or throws. The Message constructor at
// the end allows the syntax of streaming additional messages into the
// macro, for compilational compatibility with EXPECT_DEATH/ASSERT_DEATH.
# define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \
GTEST_LOG_(WARNING) \
<< "Death tests are not supported on this platform.\n" \
<< "Statement '" #statement "' cannot be verified."; \
} else if (::testing::internal::AlwaysFalse()) { \
::testing::internal::RE::PartialMatch(".*", (regex)); \
GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
terminator; \
} else \
::testing::Message()

// EXPECT_DEATH_IF_SUPPORTED(statement, regex) and
// ASSERT_DEATH_IF_SUPPORTED(statement, regex) expand to real death tests if
// death tests are supported; otherwise they just issue a warning. This is
@@ -273,11 +334,11 @@ class GTEST_API_ KilledBySignal {
ASSERT_DEATH(statement, regex)
#else
# define EXPECT_DEATH_IF_SUPPORTED(statement, regex) \
GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, )
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, )
# define ASSERT_DEATH_IF_SUPPORTED(statement, regex) \
GTEST_UNSUPPORTED_DEATH_TEST_(statement, regex, return)
GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, return)
#endif

} // namespace testing

#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H
#endif // GTEST_INCLUDE_GTEST_GTEST_DEATH_TEST_H_
93 changes: 59 additions & 34 deletions libs/gtest/include/gtest/gtest-message.h
Original file line number Diff line number Diff line change
@@ -26,10 +26,9 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//
// Author: wan@google.com (Zhanyong Wan)
//
// The Google C++ Testing Framework (Google Test)
// The Google C++ Testing and Mocking Framework (Google Test)
//
// This header file defines the Message class.
//
@@ -43,13 +42,21 @@
// to CHANGE WITHOUT NOTICE. Therefore DO NOT DEPEND ON IT in a user
// program!

#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H
#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H
// GOOGLETEST_CM0001 DO NOT DELETE

#ifndef GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
#define GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_

#include <limits>

#include "gtest/internal/gtest-string.h"
#include "gtest/internal/gtest-internal.h"
#include "gtest/internal/gtest-port.h"

GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \
/* class A needs to have dll-interface to be used by clients of class B */)

// Ensures that there is at least one operator<< in the global namespace.
// See Message& operator<<(...) below for why.
void operator<<(const testing::internal::Secret&, int);

namespace testing {

@@ -87,15 +94,7 @@ class GTEST_API_ Message {

public:
// Constructs an empty Message.
// We allocate the stringstream separately because otherwise each use of
// ASSERT/EXPECT in a procedure adds over 200 bytes to the procedure's
// stack frame leading to huge stack frames in some cases; gcc does not reuse
// the stack space.
Message() : ss_(new ::std::stringstream) {
// By default, we want there to be enough precision when printing
// a double to a Message.
*ss_ << std::setprecision(std::numeric_limits<double>::digits10 + 2);
}
Message();

// Copy constructor.
Message(const Message& msg) : ss_(new ::std::stringstream) { // NOLINT
@@ -118,7 +117,22 @@ class GTEST_API_ Message {
// Streams a non-pointer value to this object.
template <typename T>
inline Message& operator <<(const T& val) {
::GTestStreamToHelper(ss_.get(), val);
// Some libraries overload << for STL containers. These
// overloads are defined in the global namespace instead of ::std.
//
// C++'s symbol lookup rule (i.e. Koenig lookup) says that these
// overloads are visible in either the std namespace or the global
// namespace, but not other namespaces, including the testing
// namespace which Google Test's Message class is in.
//
// To allow STL containers (and other types that has a << operator
// defined in the global namespace) to be used in Google Test
// assertions, testing::Message must access the custom << operator
// from the global namespace. With this using declaration,
// overloads of << defined in the global namespace and those
// visible via Koenig lookup are both exposed in this function.
using ::operator <<;
*ss_ << val;
return *this;
}

@@ -140,7 +154,7 @@ class GTEST_API_ Message {
if (pointer == NULL) {
*ss_ << "(null)";
} else {
::GTestStreamToHelper(ss_.get(), pointer);
*ss_ << pointer;
}
return *this;
}
@@ -164,12 +178,8 @@ class GTEST_API_ Message {

// These two overloads allow streaming a wide C string to a Message
// using the UTF-8 encoding.
Message& operator <<(const wchar_t* wide_c_str) {
return *this << internal::String::ShowWideCString(wide_c_str);
}
Message& operator <<(wchar_t* wide_c_str) {
return *this << internal::String::ShowWideCString(wide_c_str);
}
Message& operator <<(const wchar_t* wide_c_str);
Message& operator <<(wchar_t* wide_c_str);

#if GTEST_HAS_STD_WSTRING
// Converts the given wide string to a narrow string using the UTF-8
@@ -183,32 +193,33 @@ class GTEST_API_ Message {
Message& operator <<(const ::wstring& wstr);
#endif // GTEST_HAS_GLOBAL_WSTRING

// Gets the text streamed to this object so far as a String.
// Gets the text streamed to this object so far as an std::string.
// Each '\0' character in the buffer is replaced with "\\0".
//
// INTERNAL IMPLEMENTATION - DO NOT USE IN A USER PROGRAM.
internal::String GetString() const {
return internal::StringStreamToString(ss_.get());
}
std::string GetString() const;

private:

#if GTEST_OS_SYMBIAN
// These are needed as the Nokia Symbian Compiler cannot decide between
// const T& and const T* in a function template. The Nokia compiler _can_
// decide between class template specializations for T and T*, so a
// tr1::type_traits-like is_pointer works, and we can overload on that.
template <typename T>
inline void StreamHelper(internal::true_type /*dummy*/, T* pointer) {
inline void StreamHelper(internal::true_type /*is_pointer*/, T* pointer) {
if (pointer == NULL) {
*ss_ << "(null)";
} else {
::GTestStreamToHelper(ss_.get(), pointer);
*ss_ << pointer;
}
}
template <typename T>
inline void StreamHelper(internal::false_type /*dummy*/, const T& value) {
::GTestStreamToHelper(ss_.get(), value);
inline void StreamHelper(internal::false_type /*is_pointer*/,
const T& value) {
// See the comments in Message& operator <<(const T&) above for why
// we need this using statement.
using ::operator <<;
*ss_ << value;
}
#endif // GTEST_OS_SYMBIAN

@@ -225,6 +236,20 @@ inline std::ostream& operator <<(std::ostream& os, const Message& sb) {
return os << sb.GetString();
}

namespace internal {

// Converts a streamable value to an std::string. A NULL pointer is
// converted to "(null)". When the input value is a ::string,
// ::std::string, ::wstring, or ::std::wstring object, each NUL
// character in it is replaced with "\\0".
template <typename T>
std::string StreamableToString(const T& streamable) {
return (Message() << streamable).GetString();
}

} // namespace internal
} // namespace testing

#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H
GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251

#endif // GTEST_INCLUDE_GTEST_GTEST_MESSAGE_H_
Loading