OSDN Git Service

こっそり、気持ち程度の日本語化しました (UTF-8 / Windows 環境用)。
[ring-lang-081/annotated-ring-with-OmegaT.git] / source / ringlibs / stdlib / stddebug.ring
1 # The Ring Standard Library
2 # Common Functions and classes for applications
3 # 2016, Mahmoud Fayed <msfclipper@yahoo.com>
4
5 Load "stdfunctions.ring"
6 Load "stdbase.ring"
7 Load "stdlibcore.ring"
8
9 if IsMainSourceFile() 
10         debug_class_test()
11 ok
12
13 func Debug_class_test
14         
15         oDebug = new Debug
16         See "Test the Debug Class Methods" + nl
17         oDebug.eval("see 'Hello'+nl")
18         try
19                 x = 10
20                 oDebug.assert(x=11)
21         catch see "assert" + nl done
22         raise("Error!")
23          
24 Class Debug
25  
26         Func eval cCode
27                 return std_eval(cCode)
28
29         Func raise cError
30                 std_raise(cError)
31
32         Func assert cCondition
33                 std_assert(cCondition)