blob: 3b9fff732855bf0f3ce21ef898c6074b1442bc7b [file] [log] [blame]
/*
* Copyright (c) 2011 Google Inc.
*
* All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
* Public License v1.0 which accompanies this distribution, and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*/
package com.google.eclipse.protobuf.ui.grammar;
import static com.google.eclipse.protobuf.ui.grammar.CompoundElement.*;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
import org.junit.Test;
/**
* Tests for <code>{@link CompoundElement#charCount()}</code>.
*
* @author alruiz@google.com (Alex Ruiz)
*/
public class CompoundElement_charCount_Test {
@Test public void should_return_number_of_characters_in_value() {
assertThat(DEFAULT_EQUAL.charCount(), equalTo(DEFAULT_EQUAL.toString().length()));
assertThat(DEFAULT_EQUAL_IN_BRACKETS.charCount(), equalTo(DEFAULT_EQUAL_IN_BRACKETS.toString().length()));
}
}