Changeset 465 for trunk/TestCase
- Timestamp:
- Mar 8, 2008, 4:52:01 PM (17 years ago)
- Location:
- trunk/TestCase/SimpleTestCase
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TestCase/SimpleTestCase/SimpleTestCase.ab
r457 r465 4 4 5 5 Dim hStdOut = _System_hConsoleOut 6 7 Sub Initialize() 8 ' 初期化関数 9 10 ' 一時ディレクトリを空にしておく 11 Dim tempDir = System.IO.Path.GetDirectoryName( System.Windows.Forms.Application.ExecutablePath ) + "\temp" 12 If System.IO.Directory.Exists( tempDir ) Then 13 ' 存在するときは一旦消す 14 System.IO.Directory.Delete( tempDir, True ) 15 End If 16 System.IO.Directory.CreateDirectory( tempDir ) 17 End Sub 18 19 Initialize() 6 20 7 21 Dim csbi As CONSOLE_SCREEN_BUFFER_INFO … … 40 54 End Sub 41 55 56 Function GetExclusiveTempDirPath( testCaseName As String ) As String 57 Dim tempDir = System.IO.Path.GetDirectoryName( System.Windows.Forms.Application.ExecutablePath ) + "\temp" 58 Dim exclusiveTempDirPath = tempDir + "\" + testCaseName 59 60 If Not System.IO.Directory.Exists( exclusiveTempDirPath ) Then 61 ' 無かったら作る 62 System.IO.Directory.CreateDirectory( exclusiveTempDirPath ) 63 End If 64 65 Return exclusiveTempDirPath 66 End Function 67 42 68 Print "Please Enter key" 43 69 System.Console.ReadLine() -
trunk/TestCase/SimpleTestCase/SimpleTestCase.idx
r432 r465 38 38 #include "XmlTest.ab" 39 39 _ClearNamespaceImported 40 41 'リソースファイル 42 #include "resource.ab" 43 #resource "SimpleTestCase.rc" 40 #include "SerializeTest.ab" 41 _ClearNamespaceImported -
trunk/TestCase/SimpleTestCase/SimpleTestCase.pj
r432 r465 23 23 #DEBUG_EXE_PATH= 24 24 25 #RESOURCE= SimpleTestCase.rc25 #RESOURCE=0 26 26 27 27 #SOURCE … … 44 44 StreamTest.ab 45 45 XmlTest.ab 46 SerializeTest.ab -
trunk/TestCase/SimpleTestCase/XmlTest.ab
r444 r465 3 3 4 4 Sub TestMain() 5 ' 一時ディレクトリを取得 6 Dim tempDir = GetExclusiveTempDirPath( "XmlTest" ) 7 5 8 Dim doc = New System.Xml.XmlDocument() 6 doc.AppendChild( doc.CreateXmlDeclaration( "1.0", " UTF-8", Nothing ) )9 doc.AppendChild( doc.CreateXmlDeclaration( "1.0", "shift-jis", Nothing ) ) 7 10 doc.AppendChild( doc.CreateElement( "root" ) ) 8 11 doc.ChildNodes[1].AppendChild( doc.CreateElement( "test" ) ) … … 15 18 doc.ChildNodes[1].Attributes.Add( attr2 ) 16 19 17 System.Diagnostics.Debug.WriteLine( doc.OuterXml() ) 20 ' 書いて 21 doc.Save( tempDir + "\test.xml" ) 22 23 ' 読んで 24 Dim clone = New System.Xml.XmlDocument 25 clone.Load( tempDir + "\test.xml" ) 26 27 ' 比較してみる 28 UnitTest( "XmlTest", doc.OuterXml = clone.OuterXml ) 18 29 End Sub 19 30
Note:
See TracChangeset
for help on using the changeset viewer.