mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-10 03:44:16 +00:00
Fix tests compilation in clang
This commit is contained in:
parent
51ab478f49
commit
76a26802e0
@ -22,10 +22,14 @@
|
||||
|
||||
using namespace app;
|
||||
|
||||
namespace app {
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const Color& color) {
|
||||
return os << color.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST(Color, fromRgb)
|
||||
{
|
||||
EXPECT_EQ(32, Color::fromRgb(32, 16, 255).getRed());
|
||||
|
@ -31,6 +31,15 @@
|
||||
using namespace app;
|
||||
using namespace raster;
|
||||
|
||||
namespace app {
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const DocumentRange& range) {
|
||||
return os << "{ layers: [" << range.layerBegin() << ", " << range.layerEnd() << "]"
|
||||
<< ", frames: [" << range.frameBegin() << ", " << range.frameEnd() << "] }";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef base::UniquePtr<Document> DocumentPtr;
|
||||
|
||||
#define EXPECT_LAYER_ORDER(a, b, c, d) \
|
||||
@ -123,11 +132,6 @@ inline DocumentRange frames_range(int frame) {
|
||||
return range(0, frame, 0, frame, DocumentRange::kFrames);
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const DocumentRange& range) {
|
||||
return os << "{ layers: [" << range.layerBegin() << ", " << range.layerEnd() << "]"
|
||||
<< ", frames: [" << range.frameBegin() << ", " << range.frameEnd() << "] }";
|
||||
}
|
||||
|
||||
TEST_F(DocRangeOps, MoveLayersNoOp) {
|
||||
// Move one layer to the same place
|
||||
|
||||
|
@ -11,11 +11,14 @@
|
||||
|
||||
using namespace base;
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Version& ver)
|
||||
{
|
||||
namespace base {
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Version& ver) {
|
||||
return os << convert_to<std::string>(ver);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST(Version, Ctor)
|
||||
{
|
||||
Version v0;
|
||||
|
@ -9,9 +9,10 @@
|
||||
#include "css/css.h"
|
||||
|
||||
using namespace css;
|
||||
using namespace std;
|
||||
|
||||
ostream& operator<<(ostream& os, const Value& value)
|
||||
namespace css {
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const Value& value)
|
||||
{
|
||||
os << "(" << value.type();
|
||||
|
||||
@ -24,6 +25,8 @@ ostream& operator<<(ostream& os, const Value& value)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace css
|
||||
|
||||
TEST(Css, Style)
|
||||
{
|
||||
Rule background("background");
|
||||
|
@ -12,6 +12,8 @@
|
||||
using namespace gfx;
|
||||
using namespace std;
|
||||
|
||||
namespace gfx {
|
||||
|
||||
ostream& operator<<(ostream& os, const Hsv& hsv)
|
||||
{
|
||||
return os << "("
|
||||
@ -23,6 +25,8 @@ ostream& operator<<(ostream& os, const Hsv& hsv)
|
||||
<< hsv.value() << ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST(Hsv, Ctor)
|
||||
{
|
||||
EXPECT_EQ(35.0, Hsv(35.0, 0.50, 0.75).hue());
|
||||
|
@ -13,6 +13,8 @@
|
||||
using namespace std;
|
||||
using namespace gfx;
|
||||
|
||||
namespace gfx {
|
||||
|
||||
ostream& operator<<(ostream& os, const Rect& rect)
|
||||
{
|
||||
return os << "("
|
||||
@ -22,6 +24,8 @@ ostream& operator<<(ostream& os, const Rect& rect)
|
||||
<< rect.h << ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST(Rect, Ctor)
|
||||
{
|
||||
EXPECT_EQ(Rect(0, 0, 0, 0), Rect());
|
||||
|
@ -12,8 +12,9 @@
|
||||
using namespace std;
|
||||
using namespace gfx;
|
||||
|
||||
ostream& operator<<(ostream& os, const Rect& rect)
|
||||
{
|
||||
namespace gfx {
|
||||
|
||||
ostream& operator<<(ostream& os, const Rect& rect) {
|
||||
return os << "("
|
||||
<< rect.x << ", "
|
||||
<< rect.y << ", "
|
||||
@ -21,6 +22,8 @@ ostream& operator<<(ostream& os, const Rect& rect)
|
||||
<< rect.h << ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ostream& operator<<(ostream& os, const Region& rgn)
|
||||
{
|
||||
os << "{";
|
||||
|
@ -12,14 +12,17 @@
|
||||
using namespace gfx;
|
||||
using namespace std;
|
||||
|
||||
ostream& operator<<(ostream& os, const Rgb& rgb)
|
||||
{
|
||||
namespace gfx {
|
||||
|
||||
ostream& operator<<(ostream& os, const Rgb& rgb) {
|
||||
return os << "("
|
||||
<< rgb.red() << ", "
|
||||
<< rgb.green() << ", "
|
||||
<< rgb.blue() << ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST(Rgb, Ctor)
|
||||
{
|
||||
EXPECT_EQ(1, Rgb(1, 2, 3).red());
|
||||
|
Loading…
x
Reference in New Issue
Block a user