Initial Revision
[ohcount] / test / unit / c_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class CTest < LingoTest
4
5         def test_comments
6                 lb = [Ohcount::LanguageBreakdown.new("cncpp", "", "//comment", 0)]
7                 assert_equal lb, Ohcount::parse(" //comment", "cncpp")
8         end
9
10         def test_empty_comments
11                 lb = [Ohcount::LanguageBreakdown.new("cncpp", "","//\n", 0)]
12                 assert_equal lb, Ohcount::parse(" //\n", "cncpp")
13         end
14
15
16         def test_block_comment
17                 lb = [Ohcount::LanguageBreakdown.new("cncpp", "","/*c*/", 0)]
18                 assert_equal lb, Ohcount::parse("/*c*/", "cncpp")
19         end
20
21         def test_comprehensive
22                 verify_parse("c1.c")
23         end
24
25 end