package net.sourceforge.phpeclipse.phpeditor.php.test;
import junit.framework.*;
+import net.sourceforge.phpdt.internal.ui.text.*;
import net.sourceforge.phpeclipse.phpeditor.php.*;
import org.eclipse.jface.text.*;
/**
* Testcase for the PHPPartitionScanner
* @author Stefan Langer
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class PHPPartitionScannerTest extends TestCase
{
fScanner.setRange(fDocument, 0, fDocument.getLength());
IToken token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
fDocument.getLength(),
fScanner.setRange(fDocument, 0, fDocument.getLength());
IToken token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
fDocument.getLength(),
IToken token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 1 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 1 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHPComment Partition 1 not recognized!",
- IPHPPartitionScannerConstants.PHP_MULTILINE_COMMENT,
+ IPHPPartitions.PHP_MULTILINE_COMMENT,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHPComment Partition 1 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 2 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 2 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"HTML 1 not recognized!",
- IPHPPartitionScannerConstants.HTML,
+ IPHPPartitions.HTML,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of HTML 1 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 3 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 3 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"HTML 2 not recognized!",
- IPHPPartitionScannerConstants.HTML,
+ IPHPPartitions.HTML,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of HTML 2 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 4 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 4 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Multilinecomment 2 not recognized!",
- IPHPPartitionScannerConstants.PHP_MULTILINE_COMMENT,
+ IPHPPartitions.PHP_MULTILINE_COMMENT,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Multilinecomment 2 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 5 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 5 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"HTML 3 not recognized!",
- IPHPPartitionScannerConstants.HTML,
+ IPHPPartitions.HTML,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of HTML 3 not correct!",
IToken token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 1 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 1 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"HTML 1 not recognized!",
- IPHPPartitionScannerConstants.HTML,
+ IPHPPartitions.HTML,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of HTML 1 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 2 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 2 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"HTML 2 not recognized!",
- IPHPPartitionScannerConstants.HTML,
+ IPHPPartitions.HTML,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of HTML 2 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition 3 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition 3 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"HTML 3 not recognized!",
- IPHPPartitionScannerConstants.HTML,
+ IPHPPartitions.HTML,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of HTML 3 not correct!",
fScanner.setRange(fDocument, 0, fDocument.getLength());
IToken token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
- IPHPPartitionScannerConstants.HTML,
+ IPHPPartitions.HTML,
(String) token.getData());
junit.framework.Assert.assertEquals(
fDocument.getLength(),
IToken token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition part 1 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition part 1 not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Multiline not recognized!",
- IPHPPartitionScannerConstants.PHP_MULTILINE_COMMENT,
+ IPHPPartitions.PHP_MULTILINE_COMMENT,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Multinline not correct!",
token = fScanner.nextToken();
junit.framework.Assert.assertEquals(
"PHP Partition part 2 not recognized!",
- IPHPPartitionScannerConstants.PHP,
+ IPHPPartitions.PHP_PARTITIONING,
(String) token.getData());
junit.framework.Assert.assertEquals(
"Length of PHP Partition part 2 not correct!",