# -*- tcl -*-
# finite_automaton.test:  tests for the grammar::fa container.
#
# Copyright (c) 2004-2007 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
#
# RCS: @(#) $Id: fa_is.test,v 1.4 2007/04/12 03:43:14 andreas_kupries Exp $

# -------------------------------------------------------------------------

test fa-is-${setimpl}-1.0 {is, error} {
    grammar::fa a
    catch {a is} msg
    a destroy
    set msg
} {wrong # args: should be "::grammar::fa::Snit_methodis type selfns win self cmd"}


test fa-is-${setimpl}-1.1 {is, error} {
    grammar::fa a
    catch {a is foo} msg
    a destroy
    set msg
} {Expected complete, deterministic, epsilon-free, or useful, got "foo"}


test fa-is-${setimpl}-1.2 {is, error} {
    grammar::fa a
    catch {a is complete bar} msg
    a destroy
    set msg
} {wrong # args: should be "::grammar::fa::Snit_methodis type selfns win self cmd"}


test fa-is-${setimpl}-1.3 {is, error} {
    grammar::fa a
    catch {a is deterministic bar} msg
    a destroy
    set msg
} {wrong # args: should be "::grammar::fa::Snit_methodis type selfns win self cmd"}


test fa-is-${setimpl}-1.4 {is, error} {
    grammar::fa a
    catch {a is useful bar} msg
    a destroy
    set msg
} {wrong # args: should be "::grammar::fa::Snit_methodis type selfns win self cmd"}


test fa-is-${setimpl}-1.5 {is, error} {
    grammar::fa a
    catch {a is epsilon-free bar} msg
    a destroy
    set msg
} {wrong # args: should be "::grammar::fa::Snit_methodis type selfns win self cmd"}


# -------------------------------------------------------------------------
::tcltest::cleanupTests
