package org.lamport.tla.toolbox.tool.tlc.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import junit.framework.Assert;
import junit.framework.TestCase;

/**
 * Test for checkpoint pattern detection
 * @author Simon Zambrovski
 * @version $Id$
 */
public class ModelHelperTest extends TestCase
{

    /* (non-Javadoc)
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception
    {
        super.setUp();
    }

    /**
     * Test method for {@link org.lamport.tla.toolbox.tool.tlc.util.ModelHelper#getCheckpoints(org.eclipse.debug.core.ILaunchConfiguration)}.
     */
    public void testRegexGetCheckpoints()
    {
        String input = "09-08-13-15-07-32";
        String input2 = "hello dolly";
        
        Pattern pattern = Pattern.compile("[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2}");
        
        Matcher matcher = pattern.matcher(input);
        Assert.assertTrue(matcher.matches());

        Matcher matcher2 = pattern.matcher(input2);
        Assert.assertFalse(matcher2.matches());
    }

}

@@ -200,36 +200,23 @@
 for 
-checkpoint pattern detection
+toolkit methods
 %0D%0A *
@@ -1107,11 +1107,105 @@
    %7D%0D%0A%0D%0A
+    %0D%0A    public void testLocationToRegion()%0D%0A    %7B%0D%0A        fail(%22Not implemented%22);%0D%0A    %7D%0D%0A
 %7D%0D%0A

test added