plptools
Loading...
Searching...
No Matches
drivetests.cc
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (c) 2026 Jason Morley <hello@jbmorley.co.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 *
19 */
20#include "config.h"
21
22#include <stdlib.h>
23#include <stdio.h>
24
25#include "doctest.h"
26#include "drive.h"
27#include "rfsv.h"
28
29TEST_CASE("Drive::getPath") {
30
31 SUBCASE("M") {
32 Drive drive(MediaType::kRAM, 0, 0, 0, 0, 0, 'M', "Drive");
33 CHECK(drive.getPath() == "M:\\");
34 }
35
36 SUBCASE("C") {
37 Drive drive(MediaType::kRAM, 0, 0, 0, 0, 0, 'C', "Drive");
38 CHECK(drive.getPath() == "C:\\");
39 }
40
41}
A class representing information about a Disk drive on the psion.
Definition: drive.h:51
std::string getPath() const
Get the file system path given by the current drive.
Definition: drive.cc:114
#define SUBCASE(name)
Definition: doctest.h:2946
#define CHECK(...)
Definition: doctest.h:2970
#define TEST_CASE(name)
Definition: doctest.h:2937