GNU Radio Manual and C++ API Reference  3.9.1.0
The Free & Open Software Radio Ecosystem
unittests.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2010,2011 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #include <gnuradio/api.h>
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <string.h>
15 #include <sys/stat.h>
16 #include <sys/types.h>
17 #ifndef _MSC_VER
18 #include <unistd.h>
19 #endif
20 #include <string>
21 
22 #include <boost/filesystem/operations.hpp>
23 #include <boost/filesystem/path.hpp>
24 
25 static std::string get_unittest_path(const std::string& filename)
26 {
27  boost::filesystem::path path = boost::filesystem::current_path() / ".unittests";
28  if (!boost::filesystem::is_directory(path))
29  boost::filesystem::create_directory(path);
30  return (path / filename).string();
31 }
get_unittest_path
static std::string get_unittest_path(const std::string &filename)
Definition: unittests.h:25
api.h