Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v2.1.0
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (27 sloc) 0.711 kb
# Author: Chris Wailes <chris.wailes@gmail.com>
# Project: Ruby Language Toolkit
# Date: 2011/04/06
# Description: This file contains unit tests for the RLTK::Token class.
############
# Requires #
############
# Standard Library
require 'test/unit'
# Ruby Language Toolkit
require 'rltk/token'
#######################
# Classes and Modules #
#######################
class TokenTester < Test::Unit::TestCase
def test_equal
t0 = RLTK::Token.new(:FOO, 0)
t1 = RLTK::Token.new(:FOO, 0)
t2 = RLTK::Token.new(:FOO, 1)
t3 = RLTK::Token.new(:BAR, 0)
t4 = RLTK::Token.new(:BAR, 1)
assert_equal(t0, t1)
assert_not_equal(t0, t2)
assert_not_equal(t0, t3)
assert_not_equal(t0, t4)
end
end
Jump to Line
Something went wrong with that request. Please try again.