luky116 commented on code in PR #741: URL: https://github.com/apache/incubator-seata-go/pull/741#discussion_r1885690515
########## pkg/saga/statemachine/statelang/parser/statemachine_config_parser_test.go: ########## @@ -0,0 +1,46 @@ +package parser + +import "testing" + +func TestStateMachineConfigParser_Parse(t *testing.T) { + parser := NewStateMachineConfigParser() + + tests := []struct { + name string + configFilePath string + }{ + { + name: "JSON Simple 1", + configFilePath: "../../../../../testdata/saga/statelang/simple_statelang_with_choice.json", + }, + { + name: "JSON Simple 2", + configFilePath: "../../../../../testdata/saga/statelang/simple_statemachine.json", + }, + { + name: "JSON Simple 3", + configFilePath: "../../../../../testdata/saga/statelang/state_machine_new_designer.json", + }, + { + name: "YAML Simple 1", + configFilePath: "../../../../../testdata/saga/statelang/simple_statelang_with_choice.yaml", + }, + { + name: "YAML Simple 2", + configFilePath: "../../../../../testdata/saga/statelang/simple_statemachine.yaml", + }, + { + name: "YAML Simple 3", + configFilePath: "../../../../../testdata/saga/statelang/state_machine_new_designer.yaml", + }, + } + + for _, tt := range tests { Review Comment: 对字段的值进行断言判断? ########## pkg/saga/statemachine/statelang/parser/statemachine_json_parser.go: ########## @@ -115,16 +112,3 @@ func (stateMachineParser JSONStateMachineParser) isTaskState(stateType string) b } return false } - Review Comment: 这些不需要用了吗 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org