RASCSI/cpp/test/test_shared.h
Uwe Seimet c41373d9bd
Use lambdas for dispatcher, code cleanup, test updates (#958)
* Using lambdas instead of member function pointers simplifies the command dispatching and reduces the code volume

* Removed duplicate error handling

* Fix for issue #956

* Unit test updates

* Resolved SonarQube issues
2022-11-02 15:36:19 +01:00

35 lines
891 B
C++

//---------------------------------------------------------------------------
//
// SCSI Target Emulator RaSCSI Reloaded
// for Raspberry Pi
//
// Copyright (C) 2022 Uwe Seimet
//
//---------------------------------------------------------------------------
#pragma once
#include "scsi.h"
#include "rascsi_interface.pb.h"
#include <string>
#include <memory>
#include <filesystem>
using namespace std;
using namespace filesystem;
using namespace rascsi_interface;
class PrimaryDevice;
class MockAbstractController;
shared_ptr<PrimaryDevice> CreateDevice(PbDeviceType, MockAbstractController&, const string& = "");
void TestInquiry(PbDeviceType, scsi_defs::device_type, scsi_defs::scsi_level, const string&,
int, bool, const string& = "");
pair<int, path> OpenTempFile();
path CreateTempFile(int);
int GetInt16(const vector<byte>&, int);
uint32_t GetInt32(const vector<byte>&, int);