Skip to content

Commit

Permalink
unit-test in components
Browse files Browse the repository at this point in the history
  • Loading branch information
miyako committed Aug 21, 2024
1 parent 2c9ffa8 commit c464176
Show file tree
Hide file tree
Showing 10 changed files with 346 additions and 9 deletions.
Binary file not shown.
17 changes: 17 additions & 0 deletions calendar-jp/Components/unit-test.4dbase/Resources/Images/fail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
{
"_method_": {},
"cs.UTest": {
"UTest": {
"new()": {
"Syntax": "**.new**()",
"Params": [],
"Summary": ""
}
},
"CLI": {
"new()": {
"Syntax": "**.new**()",
"Params": [],
"Summary": ""
}
}
},
"UTest": {
"toBe()": {
"Syntax": "**.toBe**( *expectedValue* : Variant ) : cs.UTest.UTest",
"Params": [
[
"expectedValue",
"Variant",
"->"
],
[
"",
"cs.UTest.UTest",
"<-"
]
],
"Summary": ""
},
"show()": {
"Syntax": "**.show**()",
"Params": [],
"Summary": ""
},
"run()": {
"Syntax": "**.run**( *testClasses* : Collection ) : cs.UTest.UTest",
"Params": [
[
"testClasses",
"Collection",
"->"
],
[
"",
"cs.UTest.UTest",
"<-"
]
],
"Summary": ""
},
"expect()": {
"Syntax": "**.expect**( *receivedValue* : Variant ) : cs.UTest.UTest",
"Params": [
[
"receivedValue",
"Variant",
"->"
],
[
"",
"cs.UTest.UTest",
"<-"
]
],
"Summary": ""
},
"describe()": {
"Syntax": "**.describe**( *description* : Text ) : cs.UTest.UTest",
"Params": [
[
"description",
"Text",
"->"
],
[
"",
"cs.UTest.UTest",
"<-"
]
],
"Summary": ""
},
"createMock()": {
"Syntax": "**.createMock**( *formula* : Variant; *resultToRestur* : Variant )",
"Params": [
[
"formula",
"Variant",
"->"
],
[
"resultToRestur",
"Variant",
"->"
]
],
"Summary": ""
},
"resultText()": {
"Syntax": "**.resultText**()->resultText : Text",
"Params": [
[
"resultText",
"Text",
"<-"
]
],
"Summary": ""
},
"build_HL()": {
"Syntax": "**.build_HL**( *list* : Integer )",
"Params": [
[
"list",
"Integer",
"->"
]
],
"Summary": ""
}
},
"CLI": {
"LF()": {
"Syntax": "**.LF**()->this : cs.UTest.CLI",
"Params": [
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"print()": {
"Syntax": "**.print**( *message* : Text; *style* : Text )->this : cs.UTest.CLI",
"Params": [
[
"message",
"Text",
"->"
],
[
"style",
"Text",
"->"
],
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"logo()": {
"Syntax": "**.logo**()->CLI : cs.UTest.CLI",
"Params": [
[
"CLI",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"escape()": {
"Syntax": "**.escape**( *message* : Text; *style* : Text )->ANSI : Text",
"Params": [
[
"message",
"Text",
"->"
],
[
"style",
"Text",
"->"
],
[
"ANSI",
"Text",
"<-"
]
],
"Summary": ""
},
"showCursor()": {
"Syntax": "**.showCursor**()->this : cs.UTest.CLI",
"Params": [
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"hideCursor()": {
"Syntax": "**.hideCursor**()->this : cs.UTest.CLI",
"Params": [
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"XY()": {
"Syntax": "**.XY**( *x* : Integer; *y* : Integer )->this : cs.UTest.CLI",
"Params": [
[
"x",
"Integer",
"->"
],
[
"y",
"Integer",
"->"
],
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"ES()": {
"Syntax": "**.ES**()->this : cs.UTest.CLI",
"Params": [
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"version()": {
"Syntax": "**.version**()->CLI : cs.UTest.CLI",
"Params": [
[
"CLI",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"EL()": {
"Syntax": "**.EL**()->this : cs.UTest.CLI",
"Params": [
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
},
"CR()": {
"Syntax": "**.CR**()->this : cs.UTest.CLI",
"Params": [
[
"this",
"cs.UTest.CLI",
"<-"
]
],
"Summary": ""
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd"><xliff version="1.0">
<file datatype="x-STR#" original="undefined" product-version="v11" source-language="en-US" target-language="ja">
<header />
<body />
</file>
</xliff>
21 changes: 21 additions & 0 deletions calendar-jp/Components/unit-test.4dbase/Resources/logo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
..................................................
. .
. .**. .
. .******************... .
. .************************.. .
. .******* .*********. .
. .********* .*******. .
. .*********** .*******. .
. .**** ******* .******* .
. .****. ******* .******. .
. .****. ******* .******. .
. .***. ******* .******. .
. .***********.************ .****** .
. *************.***********. ******. .
. .************.**********. .*****. .
. ******* .******. .
. .*******. ...******. .
. .***************************. .
. .************************. .
. .
..................................................
Binary file not shown.
12 changes: 3 additions & 9 deletions calendar-jp/Project/Sources/Methods/TEST.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ env:
*/

If (OB Instance of:C1731(cs:C1710.UTest.UTest; 4D:C1709.Class))

var $UTest : cs:C1710.UTest.UTest
$UTest:=cs:C1710.UTest.UTest.new()
return $UTest.run(OB Entries:C1720(cs:C1710))

Else
return {show: Formula:C1597(IDLE:C311)}
End if
var $UTest : cs:C1710.UTest.UTest
$UTest:=cs:C1710.UTest.UTest.new()
return $UTest.run(OB Entries:C1720(cs:C1710))

0 comments on commit c464176

Please sign in to comment.