mirror of https://gitlab.com/cppit/jucipp
8 changed files with 136 additions and 77 deletions
@ -0,0 +1,9 @@
|
||||
#include "notebook.h" |
||||
|
||||
Notebook::Notebook() {} |
||||
|
||||
Source::View *Notebook::get_current_view() { |
||||
return nullptr; |
||||
} |
||||
|
||||
void Notebook::open(const boost::filesystem::path &file_path, size_t notebook_index) {} |
||||
@ -0,0 +1,3 @@
|
||||
#include "project.h" |
||||
|
||||
std::unique_ptr<Project::Base> Project::current; |
||||
@ -1,33 +0,0 @@
|
||||
#include "terminal.h" |
||||
|
||||
Terminal::InProgress::InProgress(const std::string& start_msg): stop(false) {} |
||||
|
||||
Terminal::InProgress::~InProgress() {} |
||||
|
||||
std::shared_ptr<Terminal::InProgress> Terminal::print_in_progress(std::string start_msg) { |
||||
return std::make_shared<Terminal::InProgress>(""); |
||||
} |
||||
|
||||
void Terminal::InProgress::done(const std::string& msg) {} |
||||
|
||||
void Terminal::InProgress::cancel(const std::string &msg) {} |
||||
|
||||
Terminal::Terminal() {} |
||||
|
||||
bool Terminal::on_motion_notify_event(GdkEventMotion* motion_event) {return false;} |
||||
bool Terminal::on_button_press_event(GdkEventButton* button_event) {return false;} |
||||
bool Terminal::on_key_press_event(GdkEventKey *event) {return false;} |
||||
|
||||
int Terminal::process(const std::string &command, const boost::filesystem::path &path, bool use_pipes) { |
||||
return 0; |
||||
} |
||||
|
||||
int Terminal::process(std::istream &stdin_stream, std::ostream &stdout_stream, const std::string &command, const boost::filesystem::path &path) { |
||||
return 0; |
||||
} |
||||
|
||||
size_t Terminal::print(const std::string &message, bool bold) { |
||||
return 0; |
||||
} |
||||
|
||||
void Terminal::async_print(const std::string &message, bool bold) {} |
||||
@ -0,0 +1,41 @@
|
||||
#include "terminal.h" |
||||
#include <glib.h> |
||||
|
||||
//Requires display server to work
|
||||
//However, it is possible to use the Broadway backend if the test is run in a pure terminal environment:
|
||||
//broadwayd&
|
||||
//make test
|
||||
|
||||
int main() { |
||||
auto app = Gtk::Application::create(); |
||||
|
||||
{ |
||||
auto link=Terminal::get().find_link("~/test/test.cc:7:41: error: expected ';' after expression."); |
||||
assert(std::get<0>(link)==0); |
||||
assert(std::get<1>(link)==19); |
||||
assert(std::get<2>(link)=="~/test/test.cc"); |
||||
assert(std::get<3>(link)=="7"); |
||||
assert(std::get<4>(link)=="41"); |
||||
} |
||||
{ |
||||
auto link=Terminal::get().find_link("Assertion failed: (false), function main, file ~/test/test.cc, line 15."); |
||||
assert(std::get<0>(link)==47); |
||||
assert(std::get<1>(link)==70); |
||||
assert(std::get<2>(link)=="~/test/test.cc"); |
||||
assert(std::get<3>(link)=="15"); |
||||
} |
||||
{ |
||||
auto link=Terminal::get().find_link("test: ~/examples/main.cpp:17: int main(int, char**): Assertion `false' failed."); |
||||
assert(std::get<0>(link)==6); |
||||
assert(std::get<1>(link)==28); |
||||
assert(std::get<2>(link)=="~/examples/main.cpp"); |
||||
assert(std::get<3>(link)=="17"); |
||||
} |
||||
{ |
||||
auto link=Terminal::get().find_link("ERROR:~/test/test.cc:36:int main(): assertion failed: (false)"); |
||||
assert(std::get<0>(link)==6); |
||||
assert(std::get<1>(link)==23); |
||||
assert(std::get<2>(link)=="~/test/test.cc"); |
||||
assert(std::get<3>(link)=="36"); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue