new 4475edb243ed4627f4c5f2c470ca40b3def034d4
[tagua/yd.git] / tests / variants / test_utils.cpp
blob780bb22963f720a30fbd9621230f37aa74c38300
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 */
10 #include "test_utils.h"
11 #include <iostream>
12 #include <QString>
13 #include <color.h>
14 #include <piece.h>
15 #include <type.h>
17 std::ostream& operator<<(std::ostream& os, const Piece& piece) {
18 if (piece.color() && piece.type())
19 return os << qPrintable(piece.color()->name())
20 << " " << qPrintable(piece.type()->name());
21 else
22 return os << "<no piece>";
25 std::ostream& operator<<(std::ostream& os, const QString& str) {
26 return os << qPrintable(str);