summaryrefslogtreecommitdiff
path: root/indra/llui/tests
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-03 23:40:28 +0000
committerJames Cook <james@lindenlab.com>2009-10-03 23:40:28 +0000
commitada0f4fa221f2c7070fb02a2b7ff903bdde11c45 (patch)
tree0ede83511c304110138c01d16da2fff55162ef31 /indra/llui/tests
parentb1a280841e1823a19658923a8eefeb67d1d70735 (diff)
Merge inspectors UI project, gooey-4, into viewer-2 trunk. Added new tooltips to 3D avatars, 2D avatar names, and 3D objects. Refactors tooltips and text boxes, line editors, and text editors. Breaks LLExpandableTextBox, but a fix is coming.
Resolved conflicts in lltexteditor.cpp, llchatitemscontainerctrl.cpp, llchatmsgbox.cpp, llfloaterbuycurrency.cpp, llnearbychat.cpp, floater_buy_currency.xml, and ru/strings.xml Merging revisions 134925-135157 of svn+ssh://svn.lindenlab.com/svn/linden/branches/gooey/gooey-4 into C:\source\viewer-2.0.0-3, respecting ancestry
Diffstat (limited to 'indra/llui/tests')
-rw-r--r--indra/llui/tests/llurlentry_test.cpp13
-rw-r--r--indra/llui/tests/llurlmatch_test.cpp34
2 files changed, 32 insertions, 15 deletions
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp
index 1e7a0f7f2c..468fae2ec5 100644
--- a/indra/llui/tests/llurlentry_test.cpp
+++ b/indra/llui/tests/llurlentry_test.cpp
@@ -24,9 +24,17 @@
#include "../llurlentry.h"
#include "llurlentry_stub.cpp"
#include "lltut.h"
+#include "../lluicolortable.h"
#include <boost/regex.hpp>
+LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& default_color) const
+{
+ return LLUIColor();
+}
+
+LLUIColor::LLUIColor() {}
+
namespace tut
{
struct LLUrlEntryData
@@ -276,6 +284,11 @@ namespace tut
testRegex("Agent Url multicase", r,
"XXX secondlife:///App/AGENT/0E346D8B-4433-4d66-a6b0-fd37083abc4c/About XXX",
"secondlife:///App/AGENT/0E346D8B-4433-4d66-a6b0-fd37083abc4c/About");
+
+ testRegex("Agent Url alternate command", r,
+ "XXX secondlife:///App/AGENT/0E346D8B-4433-4d66-a6b0-fd37083abc4c/foobar",
+ "secondlife:///App/AGENT/0E346D8B-4433-4d66-a6b0-fd37083abc4c/foobar");
+
}
template<> template<>
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index 4dae49db90..e8cf135346 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -23,6 +23,10 @@
#include "../llurlmatch.h"
#include "lltut.h"
+// link seam
+LLUIColor::LLUIColor()
+{}
+
namespace tut
{
struct LLUrlMatchData
@@ -49,7 +53,7 @@ namespace tut
LLUrlMatch match;
ensure("empty()", match.empty());
- match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", "", "");
+ match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLUIColor(), "", "");
ensure("! empty()", ! match.empty());
}
@@ -62,7 +66,7 @@ namespace tut
LLUrlMatch match;
ensure_equals("getStart() == 0", match.getStart(), 0);
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure_equals("getStart() == 10", match.getStart(), 10);
}
@@ -75,7 +79,7 @@ namespace tut
LLUrlMatch match;
ensure_equals("getEnd() == 0", match.getEnd(), 0);
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure_equals("getEnd() == 20", match.getEnd(), 20);
}
@@ -88,10 +92,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getUrl() == ''", match.getUrl(), "");
- match.setValues(10, 20, "http://slurl.com/", "", "", "", "", "");
+ match.setValues(10, 20, "http://slurl.com/", "", "", "", LLUIColor(), "", "");
ensure_equals("getUrl() == 'http://slurl.com/'", match.getUrl(), "http://slurl.com/");
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure_equals("getUrl() == '' (2)", match.getUrl(), "");
}
@@ -104,10 +108,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getLabel() == ''", match.getLabel(), "");
- match.setValues(10, 20, "", "Label", "", "", "", "");
+ match.setValues(10, 20, "", "Label", "", "", LLUIColor(), "", "");
ensure_equals("getLabel() == 'Label'", match.getLabel(), "Label");
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure_equals("getLabel() == '' (2)", match.getLabel(), "");
}
@@ -120,10 +124,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getTooltip() == ''", match.getTooltip(), "");
- match.setValues(10, 20, "", "", "Info", "", "", "");
+ match.setValues(10, 20, "", "", "Info", "", LLUIColor(), "", "");
ensure_equals("getTooltip() == 'Info'", match.getTooltip(), "Info");
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure_equals("getTooltip() == '' (2)", match.getTooltip(), "");
}
@@ -136,10 +140,10 @@ namespace tut
LLUrlMatch match;
ensure_equals("getIcon() == ''", match.getIcon(), "");
- match.setValues(10, 20, "", "", "", "Icon", "", "");
+ match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "", "");
ensure_equals("getIcon() == 'Icon'", match.getIcon(), "Icon");
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure_equals("getIcon() == '' (2)", match.getIcon(), "");
}
@@ -152,10 +156,10 @@ namespace tut
LLUrlMatch match;
ensure("getMenuName() empty", match.getMenuName().empty());
- match.setValues(10, 20, "", "", "", "Icon", "xui_file.xml", "");
+ match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "xui_file.xml", "");
ensure_equals("getMenuName() == \"xui_file.xml\"", match.getMenuName(), "xui_file.xml");
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure("getMenuName() empty (2)", match.getMenuName().empty());
}
@@ -168,10 +172,10 @@ namespace tut
LLUrlMatch match;
ensure("getLocation() empty", match.getLocation().empty());
- match.setValues(10, 20, "", "", "", "Icon", "xui_file.xml", "Paris");
+ match.setValues(10, 20, "", "", "", "Icon", LLUIColor(), "xui_file.xml", "Paris");
ensure_equals("getLocation() == \"Paris\"", match.getLocation(), "Paris");
- match.setValues(10, 20, "", "", "", "", "", "");
+ match.setValues(10, 20, "", "", "", "", LLUIColor(), "", "");
ensure("getLocation() empty (2)", match.getLocation().empty());
}
}