HomeWildfire Games

Add a test for the FSM

Description

Add a test for the FSM

Accepted By: @wraitii

Differential Revision: https://code.wildfiregames.com/D4902

Event Timeline

phosit added a subscriber: wraitii.Jun 27 2023, 9:23 PM

@phosit tests should also follow CC.

/ps/trunk/source/network/tests/test_FSM.h
32–38

Incorrect function naming by CC.

46–55

We don't use lower camel case for enums. Even tests should follow CC. Also unsigned int is redundant here as we don't use its unsigness.

phosit added inline comments.Jun 28 2023, 8:52 AM
/ps/trunk/source/network/tests/test_FSM.h
32–38

Schould i make a diff to correct that?

46–55

The event type of the fsm is an unsigned int.

Stan added a subscriber: Stan.Jun 29 2023, 3:20 PM
Stan added inline comments.
/ps/trunk/source/network/tests/test_FSM.h
32–38

Yes ideally.

/ps/trunk/source/network/tests/test_FSM.h
46–55

You cast it anyway.

phosit added inline comments.Jul 1 2023, 11:08 AM
/ps/trunk/source/network/tests/test_FSM.h
46–55

Now i only convert it to it's underlying type.

vladislavbelov added inline comments.Jul 2 2023, 8:11 PM
/ps/trunk/source/network/tests/test_FSM.h
46–55

Yeah, but it means you hard code the type in each cast. Also it makes the code more noisy.