Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Base
{
public:
virtual ~Base() = default;
virtual void saySomething() = 0;
virtual std::string saySomething() = 0;
};

class BaseWithInterfaceCtor
Expand Down
18 changes: 9 additions & 9 deletions test/global_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* 2020, Copied from plugins1.cpp and plugins2.cpp and changing class names
*/

#include <iostream>
#include <string>

#include "class_loader/class_loader.hpp"

Expand All @@ -39,36 +39,36 @@
class Kangaroo : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("[Angry growl]\n");
return "[Angry growl]";
}
};

class Panda : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("[Excited squeaks!!!]\n");
return "[Excited squeaks!!!]";
}
};

class Hyena : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("[Cackling laugh]\n");
return "[Cackling laugh]";
}
};

class Alpaca : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("hhhaaaaaaaaaa\n");
return "hhhaaaaaaaaaa";
}
};

Expand Down
22 changes: 11 additions & 11 deletions test/plugins1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <iostream>
#include <string>

#include "class_loader/class_loader.hpp"

Expand All @@ -36,45 +36,45 @@
class Dog : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Bark\n");
return "Bark";
}
};

class Cat : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Meow\n");
return "Meow";
}
};

class Duck : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Quack\n");
return "Quack";
}
};

class Cow : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Moooo\n");
return "Moooo";
}
};

class Sheep : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Baaah\n");
return "Baaah";
}
};

Expand Down
18 changes: 9 additions & 9 deletions test/plugins2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <iostream>
#include <string>

#include "class_loader/class_loader.hpp"

Expand All @@ -36,36 +36,36 @@
class Robot : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Beep boop\n");
return "Beep boop";
}
};

class Alien : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Znornoff!!!\n");
return "Znornoff!!!";
}
};

class Monster : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("BEAAAHHHH\n");
return "BEAAAHHHH";
}
};

class Zombie : public Base
{
public:
void saySomething() override
std::string saySomething() override
{
printf("Brains!!!\n");
return "Brains!!!";
}
};

Expand Down
Loading