minor doc & style fixes
diff --git a/tests/object.h b/tests/object.h
index 31aa289..753f654 100644
--- a/tests/object.h
+++ b/tests/object.h
@@ -82,7 +82,7 @@
/// Move constructor
ref(ref &&r) : m_ptr(r.m_ptr) {
- r.m_ptr = nullptr;
+ r.m_ptr = nullptr;
print_move_created(this, "with pointer", m_ptr); track_move_created((ref_tag*) this);
}
diff --git a/tests/test_callbacks.cpp b/tests/test_callbacks.cpp
index 31d0740..8e0a6cc 100644
--- a/tests/test_callbacks.cpp
+++ b/tests/test_callbacks.cpp
@@ -80,7 +80,7 @@
/* Test cleanup of lambda closure */
- m.def("test_cleanup", []() -> std::function<void(void)> {
+ m.def("test_cleanup", []() -> std::function<void(void)> {
Payload p;
return [p]() {
diff --git a/tests/test_eigen.cpp b/tests/test_eigen.cpp
index 518cfec..a9cb9f2 100644
--- a/tests/test_eigen.cpp
+++ b/tests/test_eigen.cpp
@@ -84,51 +84,51 @@
return m.selfadjointView<Eigen::Upper>();
});
- m.def("fixed_r", [mat]() -> FixedMatrixR {
+ m.def("fixed_r", [mat]() -> FixedMatrixR {
return FixedMatrixR(mat);
});
- m.def("fixed_c", [mat]() -> FixedMatrixC {
+ m.def("fixed_c", [mat]() -> FixedMatrixC {
return FixedMatrixC(mat);
});
- m.def("fixed_passthrough_r", [](const FixedMatrixR &m) -> FixedMatrixR {
+ m.def("fixed_passthrough_r", [](const FixedMatrixR &m) -> FixedMatrixR {
return m;
});
- m.def("fixed_passthrough_c", [](const FixedMatrixC &m) -> FixedMatrixC {
+ m.def("fixed_passthrough_c", [](const FixedMatrixC &m) -> FixedMatrixC {
return m;
});
- m.def("dense_r", [mat]() -> DenseMatrixR {
+ m.def("dense_r", [mat]() -> DenseMatrixR {
return DenseMatrixR(mat);
});
- m.def("dense_c", [mat]() -> DenseMatrixC {
+ m.def("dense_c", [mat]() -> DenseMatrixC {
return DenseMatrixC(mat);
});
- m.def("dense_passthrough_r", [](const DenseMatrixR &m) -> DenseMatrixR {
+ m.def("dense_passthrough_r", [](const DenseMatrixR &m) -> DenseMatrixR {
return m;
});
- m.def("dense_passthrough_c", [](const DenseMatrixC &m) -> DenseMatrixC {
+ m.def("dense_passthrough_c", [](const DenseMatrixC &m) -> DenseMatrixC {
return m;
});
- m.def("sparse_r", [mat]() -> SparseMatrixR {
+ m.def("sparse_r", [mat]() -> SparseMatrixR {
return Eigen::SparseView<Eigen::MatrixXf>(mat);
});
- m.def("sparse_c", [mat]() -> SparseMatrixC {
+ m.def("sparse_c", [mat]() -> SparseMatrixC {
return Eigen::SparseView<Eigen::MatrixXf>(mat);
});
- m.def("sparse_passthrough_r", [](const SparseMatrixR &m) -> SparseMatrixR {
+ m.def("sparse_passthrough_r", [](const SparseMatrixR &m) -> SparseMatrixR {
return m;
});
- m.def("sparse_passthrough_c", [](const SparseMatrixC &m) -> SparseMatrixC {
+ m.def("sparse_passthrough_c", [](const SparseMatrixC &m) -> SparseMatrixC {
return m;
});
});
diff --git a/tests/test_enum.cpp b/tests/test_enum.cpp
index 6ed0a6a..87cb7d0 100644
--- a/tests/test_enum.cpp
+++ b/tests/test_enum.cpp
@@ -25,7 +25,7 @@
EFirstMode = 1,
ESecondMode
};
-
+
static EMode test_function(EMode mode) {
return mode;
}
diff --git a/tests/test_kwargs_and_defaults.cpp b/tests/test_kwargs_and_defaults.cpp
index 0656cc5..bd24498 100644
--- a/tests/test_kwargs_and_defaults.cpp
+++ b/tests/test_kwargs_and_defaults.cpp
@@ -59,7 +59,7 @@
using namespace py::literals;
m.def("kw_func_udl", &kw_func, "x"_a, "y"_a=300);
m.def("kw_func_udl_z", &kw_func, "x"_a, "y"_a=0);
-
+
py::class_<KWClass>(m, "KWClass")
.def("foo0", &KWClass::foo)
.def("foo1", &KWClass::foo, "x"_a, "y"_a);
diff --git a/tests/test_stl_binders.cpp b/tests/test_stl_binders.cpp
index dabcaf0..e390376 100644
--- a/tests/test_stl_binders.cpp
+++ b/tests/test_stl_binders.cpp
@@ -10,6 +10,8 @@
#include "pybind11_tests.h"
#include <pybind11/stl_bind.h>
+#include <map>
+#include <unordered_map>
class El {
public:
@@ -28,18 +30,18 @@
py::class_<El>(m, "El")
.def(py::init<int>());
- py::bind_vector< std::vector<unsigned int> >(m, "VectorInt");
- py::bind_vector< std::vector<bool> >(m, "VectorBool");
+ py::bind_vector<std::vector<unsigned int>>(m, "VectorInt");
+ py::bind_vector<std::vector<bool>>(m, "VectorBool");
- py::bind_vector< std::vector<El> >(m, "VectorEl");
+ py::bind_vector<std::vector<El>>(m, "VectorEl");
- py::bind_vector< std::vector< std::vector<El> > >(m, "VectorVectorEl");
+ py::bind_vector<std::vector<std::vector<El>>>(m, "VectorVectorEl");
});
test_initializer stl_binder_map([](py::module &m) {
- py::bind_map< std::map<std::string, double> >(m, "MapStringDouble");
- py::bind_map< std::unordered_map<std::string, double> >(m, "UnorderedMapStringDouble");
+ py::bind_map<std::map<std::string, double>>(m, "MapStringDouble");
+ py::bind_map<std::unordered_map<std::string, double>>(m, "UnorderedMapStringDouble");
- py::bind_map< std::map<std::string, double const> >(m, "MapStringDoubleConst");
- py::bind_map< std::unordered_map<std::string, double const> >(m, "UnorderedMapStringDoubleConst");
+ py::bind_map<std::map<std::string, double const>>(m, "MapStringDoubleConst");
+ py::bind_map<std::unordered_map<std::string, double const>>(m, "UnorderedMapStringDoubleConst");
});