Changeset 656 for trunk/ab5.0


Ignore:
Timestamp:
Nov 9, 2008, 2:36:29 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

文字列比較のテストを3引数版UnitTestの呼出に変更

Location:
trunk/ab5.0/ablib/TestCase/SimpleTestCase
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/CollectionTest.ab

    r537 r656  
    99    d.Add("茶", "Tea")
    1010
    11     UnitTest("Dictionary.Add, Item (1)", d.Item["赤"] = "Red")
    12     UnitTest("Dictionary.Add, Item (2)", d.Item["黄"] = "Yellow")
    13     UnitTest("Dictionary.Add, Item (3)", d.Item("緑") = "Green")
    14     UnitTest("Dictionary.Add, Item (4)", d.Item("青") = "Blue")
     11    UnitTest("Dictionary.Add, Item (1)", d.Item["赤"], "Red")
     12    UnitTest("Dictionary.Add, Item (2)", d.Item["黄"], "Yellow")
     13    UnitTest("Dictionary.Add, Item (3)", d.Item("緑"), "Green")
     14    UnitTest("Dictionary.Add, Item (4)", d.Item("青"), "Blue")
    1515
    1616    UnitTest("Dictionary.Remove", d.Remove("茶"))
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/DelegateTest.ab

    r569 r656  
    55Public
    66    Sub StringEx( str As String )
    7         String( str )
     7        String( StrPtr(str), str.Length )
    88    End Sub
    99End Class
     
    119119
    120120    Dim dg7 = New Callback7( AddressOf(TestClass.Proc7) )   ' 共変戻り値サポートのテスト
    121     UnitTest( "Delegate2", dg7( "test value" ) = "Proc7 result[test value]" )
     121    UnitTest( "Delegate2", dg7( "test value" ), "Proc7 result[test value]" )
    122122
    123123    Dim dg184 = New CallbackTicket184( AddressOf( testObj.Ticket184 ) )
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/GCHandleTest.ab

    r383 r656  
    2121End Namespace
    2222
    23 GCHandleTest.TestMain()
     23'GCHandleTest.TestMain()
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/Generics.ab

    r613 r656  
    3131    ' TODO: より多くのパターンで試す必要あり
    3232    Dim bar = New Bar<Long>
    33     UnitTest( "Generic ... complex", bar.GetTypeName( New String() ) = "String" )
     33    UnitTest( "Generic ... complex", bar.GetTypeName( New String() ), "String" )
    3434End Sub
    3535
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/ObjectTest.ab

    r232 r656  
    1818    UnitTest( "Object.GetHashCode", obj1.GetHashCode() = ObjPtr( obj1 ) )
    1919
    20     UnitTest( "Object.ToString", obj1.ToString() = "Object" )
     20    UnitTest( "Object.ToString", obj1.ToString(), "Object" )
    2121
    22     UnitTest( "Object.GetType", obj1.GetType().Name = "Object" )
     22    UnitTest( "Object.GetType", obj1.GetType().Name, "Object" )
    2323End Sub
    2424
    2525End Namespace
    2626
    27 ObjectTest.TestMain()
     27'ObjectTest.TestMain()
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/PathTest.ab

    r411 r656  
    99Sub TestMain()
    1010    Dim testPath = New String("C:\Dir.Name\file.name.ext")
    11     UnitTest("Path.GetFileName", Path.GetFileName(testPath) = "file.name.ext")
     11    UnitTest("Path.GetFileName", Path.GetFileName(testPath), "file.name.ext")
    1212
    13     UnitTest("Path.GetFileNameWithoutExtension", Path.GetFileNameWithoutExtension(testPath) = "file.name")
     13    UnitTest("Path.GetFileNameWithoutExtension", Path.GetFileNameWithoutExtension(testPath), "file.name")
    1414
    1515
    16     UnitTest("Path.GetExtension", Path.GetExtension(testPath) = ".ext")
     16    UnitTest("Path.GetExtension", Path.GetExtension(testPath), ".ext")
    1717
    18     UnitTest("Path.ChangeExtension", Path.ChangeExtension(testPath, ".newExt") = "C:\Dir.Name\file.name.newExt")
     18    UnitTest("Path.ChangeExtension", Path.ChangeExtension(testPath, ".newExt"), "C:\Dir.Name\file.name.newExt")
    1919
    2020    UnitTest("Path.HasExtension (Case1)", Path.HasExtension(testPath) = True)
    2121    UnitTest("Path.HasExtension (Case2)", Path.HasExtension("fileName") = False)
    2222
    23     UnitTest("Path.GetPathRoot", Path.GetPathRoot(testPath) = "C:\")
     23    UnitTest("Path.GetPathRoot", Path.GetPathRoot(testPath), "C:\")
    2424
    2525    UnitTest("Path.IsPathRooted (Case1)", Path.IsPathRooted(testPath) = True)
    2626    UnitTest("Path.IsPathRooted (Case2)", Path.IsPathRooted("Dir.Name\file.name.ext") = False)
    2727
    28     UnitTest("Path.Combine (Case1)", Path.Combine("C:\dir", "filename.txt") = "C:\dir\filename.txt")
    29     UnitTest("Path.Combine (Case2)", Path.Combine("C:\dir\", "filename.txt") = "C:\dir\filename.txt")
     28    UnitTest("Path.Combine (Case1)", Path.Combine("C:\dir", "filename.txt"), "C:\dir\filename.txt")
     29    UnitTest("Path.Combine (Case2)", Path.Combine("C:\dir\", "filename.txt"), "C:\dir\filename.txt")
    3030
    3131/*
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/SimpleTestCase.ab

    r632 r656  
    2525
    2626'Initialize()
    27 
    28 Dim prevBackColor = System.Console.BackgroundColor
    29 Dim prevForeColor = System.Console.ForegroundColor
    3027
    3128#include "SimpleTestCase.idx"
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/StreamTest.ab

    r477 r656  
    1313    UnitTest("sr.Read() - 2", sr.Read() = &h20)
    1414    UnitTest("sr.Peek()", sr.Peek() = &h61)
    15     UnitTest("sr.ReadLine() \n", sr.ReadLine() = "abc")
    16     UnitTest("sr.ReadLine() \r\n", sr.ReadLine() = "123")
     15    UnitTest("sr.ReadLine() \n", sr.ReadLine(), "abc")
     16    UnitTest("sr.ReadLine() \r\n", sr.ReadLine(), "123")
    1717    Dim s = sr.ReadToEnd()
    18     UnitTest("sr.ReadToEnd() \r\n", s = Ex"あいうえお\r\nアイウエオ")
     18    UnitTest("sr.ReadToEnd() \r\n", s, Ex"あいうえお\r\nアイウエオ")
    1919End Sub
    2020
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/StringBuilderTest.ab

    r468 r656  
    99Sub TestMain()
    1010    Dim sb = New StringBuilder("Hello")
    11     UnitTest("StringBuilder - Constractor & ToString", sb.ToString, "Hello")
     11    UnitTest("StringBuilder - Constractor & ToString", sb.ToString(), "Hello")
    1212    UnitTest("StringBuilder.ToString(index, count)", sb.ToString(1, 3), "ell")
    13     UnitTest("StringBuilder.Append", sb.Append("StringBuilder").ToString, "HelloStringBuilder")
    14     UnitTest("StringBuilder.Insert (String)", sb.Insert(5, ", ").ToString, "Hello, StringBuilder")
     13    UnitTest("StringBuilder.Append", sb.Append("StringBuilder").ToString(), "HelloStringBuilder")
     14    UnitTest("StringBuilder.Insert (String)", sb.Insert(5, ", ").ToString(), "Hello, StringBuilder")
    1515    sb.Length = 0
    16     UnitTest("StringBuilder.Length = 0", sb.ToString, "")
     16    UnitTest("StringBuilder.Length = 0", sb.ToString(), "")
    1717    sb.Append("でてこいでてこいいけのこい")
    1818    sb.Replace("こい", "いけ").Replace("いけ", "こい")
    19     UnitTest("StringBuilder.Replace (String)", sb.ToString, "でてこいでてこいこいのこい")
     19    UnitTest("StringBuilder.Replace (String)", sb.ToString(), "でてこいでてこいこいのこい")
    2020    sb.Length = 0
    2121    sb.Append(123)
    22     UnitTest("StringBuilder.Append (Long)", sb.ToString, "123")
     22    UnitTest("StringBuilder.Append (Long)", sb.ToString(), "123")
    2323End Sub
    2424
  • trunk/ab5.0/ablib/TestCase/SimpleTestCase/VersionTest.ab

    r299 r656  
    1010    Dim v1234 = New System.Version(1, 2, 3, 4)
    1111
    12     UnitTest("Version(major, minor)", String.Compare(v12.ToString(), "1.2") = 0)
    13     UnitTest("Version(major, minor, build)", String.Compare(v123.ToString(), "1.2.3") = 0)
    14     UnitTest("Version(major, minor, build, revision)", String.Compare(v1234.ToString(), "1.2.3.4") = 0)
     12    UnitTest("Version(major, minor)", v12.ToString(), "1.2")
     13    UnitTest("Version(major, minor, build)", v123.ToString(), "1.2.3")
     14    UnitTest("Version(major, minor, build, revision)", v1234.ToString(), "1.2.3.4")
    1515
    16     UnitTest("Version.ToString(0)", String.Compare(v1234.ToString(0), "") = 0)
    17     UnitTest("Version.ToString(1)", String.Compare(v1234.ToString(1), "1") = 0)
    18     UnitTest("Version.ToString(2)", String.Compare(v1234.ToString(2), "1.2") = 0)
    19     UnitTest("Version.ToString(3)", String.Compare(v1234.ToString(3), "1.2.3") = 0)
    20     UnitTest("Version.ToString(4)", String.Compare(v1234.ToString(4), "1.2.3.4") = 0)
     16    UnitTest("Version.ToString(0)", v1234.ToString(0), "")
     17    UnitTest("Version.ToString(1)", v1234.ToString(1), "1")
     18    UnitTest("Version.ToString(2)", v1234.ToString(2), "1.2")
     19    UnitTest("Version.ToString(3)", v1234.ToString(3), "1.2.3")
     20    UnitTest("Version.ToString(4)", v1234.ToString(4), "1.2.3.4")
    2121
    2222    UnitTest("Version.Major", v1234.Major = 1)
Note: See TracChangeset for help on using the changeset viewer.