Sha256: 03215e25d51608e857dca33e42e9aa91f5d52ced01339a9d6daa039aad56c12d

Contents?: true

Size: 1.1 KB

Versions: 21

Compression:

Stored size: 1.1 KB

Contents

#include "tut.h"
#include "StaticString.h"

using namespace Passenger;
using namespace std;

namespace tut {
	struct StaticStringTest {
	};
	
	DEFINE_TEST_GROUP(StaticStringTest);

	TEST_METHOD(1) {
		// Test == operator.
		ensure(StaticString("") == "");
		ensure(StaticString("foo") == "foo");
		ensure(!(StaticString("foo") == "bar"));
	}
	
	TEST_METHOD(2) {
		// Test < operator.
		ensure_equals("Assertion 1",
			StaticString("") < "",
			string("") < string("")
		);
		ensure_equals("Assertion 2",
			StaticString("abc") < "abc",
			string("abc") < string("abc")
		);
		ensure_equals("Assertion 3",
			StaticString("foo") < "bar",
			string("foo") < string("bar")
		);
		ensure_equals("Assertion 4",
			StaticString("foo") < "bar!",
			string("foo") < string("bar!")
		);
		ensure_equals("Assertion 5",
			StaticString("bar!") < "foo",
			string("bar!") < string("foo")
		);
		ensure_equals("Assertion 6",
			StaticString("hello") < "hello world",
			string("hello") < string("hello world")
		);
		ensure_equals("Assertion 7",
			StaticString("hello world") < "hello",
			string("hello world") < string("hello")
		);
	}
}

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
vanity-1.7.1 vendor/ruby/1.9.1/gems/passenger-2.2.15/test/StaticStringTest.cpp
passenger-2.2.15 test/StaticStringTest.cpp
passenger-2.2.14 test/StaticStringTest.cpp
passenger-2.2.13 test/StaticStringTest.cpp
passenger-2.2.12 test/StaticStringTest.cpp
colouringcode-passenger-0.2 test/StaticStringTest.cpp
passenger-2.2.11 test/StaticStringTest.cpp
passenger-jmazzi-2.2.10 test/StaticStringTest.cpp
passenger-2.2.10 test/StaticStringTest.cpp
passenger-jmazzi-2.2.9 test/StaticStringTest.cpp
passenger-2.2.9 test/StaticStringTest.cpp
passenger-2.2.8 test/StaticStringTest.cpp
colouringcode-passenger-0.1 test/StaticStringTest.cpp
passenger-2.2.7 test/StaticStringTest.cpp
passenger-2.2.6 test/StaticStringTest.cpp
passenger-2.2.5 test/StaticStringTest.cpp
passenger-2.2.3 test/StaticStringTest.cpp
passenger-2.2.4 test/StaticStringTest.cpp
passenger-2.2.1 test/StaticStringTest.cpp
passenger-2.2.0 test/StaticStringTest.cpp