X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cdf6a962eb4e88efbed3df9c41343adabcf09e6c..1c27bfd8bf760d9b7f8220f17025acaf0da83cd2:/src/mc/sosp/PageStore_test.cpp diff --git a/src/mc/sosp/PageStore_test.cpp b/src/mc/sosp/PageStore_test.cpp index c9fbe6f0ca..05e1d72251 100644 --- a/src/mc/sosp/PageStore_test.cpp +++ b/src/mc/sosp/PageStore_test.cpp @@ -1,10 +1,11 @@ -/* Copyright (c) 2015-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "src/include/catch.hpp" +#include "src/3rd-party/catch.hpp" +#include #include #include #include @@ -25,7 +26,7 @@ public: static std::size_t pagesize; static std::unique_ptr store; static void* data; - static size_t pageno[4]; + static std::array pageno; static int value; // member functions used by the test suite(s) @@ -43,13 +44,13 @@ public: std::size_t helper_tests::pagesize = 0; std::unique_ptr helper_tests::store = nullptr; void* helper_tests::data = nullptr; -size_t helper_tests::pageno[4] = {0, 0, 0, 0}; +std::array helper_tests::pageno = {{0, 0, 0, 0}}; int helper_tests::value = 0; void helper_tests::Init() { pagesize = (size_t)getpagesize(); - store.reset(new simgrid::mc::PageStore(50)); + store = std::make_unique(50); data = mmap(nullptr, getpagesize(), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); REQUIRE(store->size() == 0); }