Beispiel #1
0
int test_no_code()
{
	int result = 0;
	test_msg_start("Testing For NULL Source");

	pC = NULL;
	result = has_more_tokens(pC);

	if(result == PASSED)
	{
		test_msg_end(PASSED);
	} else {
		test_msg_end(FAILED);
	}

	return result;
}
Beispiel #2
0
int test_end_of_code()
{
	int result = 0;
	char source[] = "\n\0";

	test_msg_start("Testing For EOF Source");

	pC = source;
	result = has_more_tokens(pC);

	if(result == PASSED)
	{
		test_msg_end(PASSED);
	} else {
		test_msg_end(FAILED);
	}

	return result;
}
bool
XPathParserTokenSource::next_token_is(XPathTokenType type)
{
  return has_more_tokens() && peek_token().is(type);
}