Skip to content

Commit

Permalink
Use include guards (doctest#679)
Browse files Browse the repository at this point in the history
* Change to ‘Include Guards’ to enhance compatibility

* Update doctest/extensions/mpi_sub_comm.h

Optimising macro names

Co-authored-by: Philipp Bucher <[email protected]>

* Update doctest/extensions/mpi_reporter.h

Optimising macro names

Co-authored-by: Philipp Bucher <[email protected]>

Co-authored-by: Philipp Bucher <[email protected]>
  • Loading branch information
jokervTv and philbucher authored Aug 7, 2022
1 parent b7c21ec commit bc54874
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion doctest/extensions/doctest_mpi.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#ifndef DOCTEST_MPI_H
#define DOCTEST_MPI_H

#ifdef DOCTEST_CONFIG_IMPLEMENT

Expand Down Expand Up @@ -164,3 +165,5 @@ insufficient_procs(int test_nb_procs) {


#endif // DOCTEST_CONFIG_IMPLEMENT

#endif // DOCTEST_MPI_H
5 changes: 4 additions & 1 deletion doctest/extensions/doctest_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
// https://github.com/doctest/doctest/blob/master/doc/markdown/readme.md
//

#pragma once
#ifndef DOCTEST_UTIL_H
#define DOCTEST_UTIL_H

#ifndef DOCTEST_LIBRARY_INCLUDED
#include "../doctest.h"
Expand All @@ -32,3 +33,5 @@ namespace doctest {
}

} // namespace doctest

#endif // DOCTEST_UTIL_H
5 changes: 4 additions & 1 deletion doctest/extensions/mpi_reporter.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#ifndef DOCTEST_MPI_REPORTER_H
#define DOCTEST_MPI_REPORTER_H

// #include <doctest/doctest.h>
#include <fstream>
Expand Down Expand Up @@ -266,3 +267,5 @@ REGISTER_REPORTER("MpiFileReporter", 1, MpiFileReporter);

} // anonymous
} // doctest

#endif // DOCTEST_REPORTER_H
5 changes: 4 additions & 1 deletion doctest/extensions/mpi_sub_comm.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#pragma once
#ifndef DOCTEST_MPI_SUB_COMM_H
#define DOCTEST_MPI_SUB_COMM_H

#include "mpi.h"
#include "doctest/doctest.h"
Expand Down Expand Up @@ -79,3 +80,5 @@ struct mpi_sub_comm {
};

} // doctest

#endif // DOCTEST_SUB_COMM_H

0 comments on commit bc54874

Please sign in to comment.