Ignore:
Timestamp:
Nov 20, 2007, 12:04:07 AM (16 years ago)
Author:
イグトランス (egtra)
Message:

例外クラスの実装。ExceptionTestでSystem.Exceptionを使用するようにした。
StringBuilderでコメント化されていた例外を投げる処理を有効にした(除OutOfMemory)。
Str$の実装にSPrintfなどを使用するようにした。
毎回Object.ReferenceEquals(xxx, Nothing)と打つのが面倒なので、IsNothingを導入。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TestCase/SimpleTestCase/ExceptionTest.ab

    r375 r385  
    22
    33Sub BadProc()
    4     Throw New String("hello! I am bad proc.")
     4    Throw New System.Exception("hello! I am bad proc.")
    55End Sub
    66
     
    1515            resultOfTest1 = True
    1616        End Try
    17     Catch msg As String
     17    Catch msg As System.Exception
    1818        ' msgの受け渡しが未完成
    19         If msg = "hello! I am bad proc." Then
     19        If msg.Message = "hello! I am bad proc." Then
    2020            resultOfTest2 = True
    2121        End If
    2222    Catch
    2323        System.Diagnostics.Trace.WriteLine( "Catchが実行された。ここに来るのは正しくない" )
     24        UnitTest( "到達しないコードへ到達", False)
    2425    Finally
    2526        resultOfTest3 = True
Note: See TracChangeset for help on using the changeset viewer.