Last change
on this file since 359 was 355, checked in by イグトランス (egtra), 17 years ago |
FormatIntegerDを実装。
UnitTestの失敗時の表示を目立つようにした。
ArrayListを名前空間System.Collectionsに入れた。
|
File size:
693 bytes
|
Line | |
---|
1 | ' SimpleTestCase.ab
|
---|
2 |
|
---|
3 | #console
|
---|
4 |
|
---|
5 | Dim hStdOut = _System_hConsoleOut
|
---|
6 |
|
---|
7 | Dim csbi As CONSOLE_SCREEN_BUFFER_INFO
|
---|
8 | GetConsoleScreenBufferInfo(hStdOut, csbi)
|
---|
9 |
|
---|
10 | #include "SimpleTestCase.idx"
|
---|
11 |
|
---|
12 | Function UnitTest( msg As String, isSuccessful As Boolean )
|
---|
13 | Dim resultStr As String
|
---|
14 | If isSuccessful Then
|
---|
15 | resultStr = Ex"OK "
|
---|
16 | Else
|
---|
17 | resultStr = Ex"FAILURE!"
|
---|
18 | End If
|
---|
19 |
|
---|
20 | If Not isSuccessful Then
|
---|
21 | SetConsoleTextAttribute(hStdOut, BACKGROUND_RED Or BACKGROUND_GREEN Or BACKGROUND_INTENSITY)
|
---|
22 | End If
|
---|
23 |
|
---|
24 | Print resultStr; msg
|
---|
25 |
|
---|
26 | If Not isSuccessful Then
|
---|
27 | SetConsoleTextAttribute(hStdOut, csbi.wAttributes)
|
---|
28 | End If
|
---|
29 | End Function
|
---|
30 |
|
---|
31 | Print "Please enter any key"
|
---|
32 | Dim a As Long
|
---|
33 | Input a
|
---|
Note:
See
TracBrowser
for help on using the repository browser.