Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Regarding code style and other checks, maybe it's better to use a specialized tool for that? I just

[DiscordArchive] Regarding code style and other checks, maybe it's better to use a specialized tool for that? I just

[DiscordArchive] Regarding code style and other checks, maybe it's better to use a specialized tool for that? I just

Pages (8): Previous 1 4 5 6 7 8 Next  
rektbyfaith
Administrator
0
08-18-2024, 10:12 PM
#61
Archived author: Deleted User • Posted: 2024-08-18T22:12:34.684000+00:00
Original source

The problem is that you can't force people to do what they don't want to do. It's a community project, it's always difficult to find testers so... But maybe without writing 100 tests an example could open the way (I'm planning to look into it but I don't know much about it yet).
rektbyfaith
08-18-2024, 10:12 PM #61

Archived author: Deleted User • Posted: 2024-08-18T22:12:34.684000+00:00
Original source

The problem is that you can't force people to do what they don't want to do. It's a community project, it's always difficult to find testers so... But maybe without writing 100 tests an example could open the way (I'm planning to look into it but I don't know much about it yet).

rektbyfaith
Administrator
0
08-18-2024, 10:13 PM
#62
Archived author: Rymercyble • Posted: 2024-08-18T22:13:17.287000+00:00
Original source

what ? yes i can....well not me specifically but project owner
rektbyfaith
08-18-2024, 10:13 PM #62

Archived author: Rymercyble • Posted: 2024-08-18T22:13:17.287000+00:00
Original source

what ? yes i can....well not me specifically but project owner

rektbyfaith
Administrator
0
08-18-2024, 10:13 PM
#63
Archived author: Bench • Posted: 2024-08-18T22:13:42.926000+00:00
Original source

No more contributors then
rektbyfaith
08-18-2024, 10:13 PM #63

Archived author: Bench • Posted: 2024-08-18T22:13:42.926000+00:00
Original source

No more contributors then

rektbyfaith
Administrator
0
08-18-2024, 10:13 PM
#64
Archived author: Rymercyble • Posted: 2024-08-18T22:13:54.793000+00:00
Original source

well then no more bad code
rektbyfaith
08-18-2024, 10:13 PM #64

Archived author: Rymercyble • Posted: 2024-08-18T22:13:54.793000+00:00
Original source

well then no more bad code

rektbyfaith
Administrator
0
08-18-2024, 10:14 PM
#65
Archived author: Rymercyble • Posted: 2024-08-18T22:14:03.973000+00:00
Original source

i mean its 1 possible approach
rektbyfaith
08-18-2024, 10:14 PM #65

Archived author: Rymercyble • Posted: 2024-08-18T22:14:03.973000+00:00
Original source

i mean its 1 possible approach

rektbyfaith
Administrator
0
08-18-2024, 11:26 PM
#66
Archived author: walkline • Posted: 2024-08-18T23:26:27.649000+00:00
Original source

I don't quite agree with that.
You can't write tests for untestable code. To make the code testable, you need to get rid of singletons, utilize dependency injection, and work with interfaces and abstractions. So you need to refactor everything.

You can write some tests for isolated things, like these tests for configuration with environment variables – https://github.com/azerothcore/azerothco...Config.cpp, but we all know that the core functionality lies within the spell and entity systems, which are completely untestable.
rektbyfaith
08-18-2024, 11:26 PM #66

Archived author: walkline • Posted: 2024-08-18T23:26:27.649000+00:00
Original source

I don't quite agree with that.
You can't write tests for untestable code. To make the code testable, you need to get rid of singletons, utilize dependency injection, and work with interfaces and abstractions. So you need to refactor everything.

You can write some tests for isolated things, like these tests for configuration with environment variables – https://github.com/azerothcore/azerothco...Config.cpp, but we all know that the core functionality lies within the spell and entity systems, which are completely untestable.

rektbyfaith
Administrator
0
08-18-2024, 11:36 PM
#67
Archived author: Rymercyble • Posted: 2024-08-18T23:36:11.181000+00:00
Original source

im not sure i see how are singletons or absence of abstraction limiting possibility to test stuff
rektbyfaith
08-18-2024, 11:36 PM #67

Archived author: Rymercyble • Posted: 2024-08-18T23:36:11.181000+00:00
Original source

im not sure i see how are singletons or absence of abstraction limiting possibility to test stuff

rektbyfaith
Administrator
0
08-18-2024, 11:37 PM
#68
Archived author: Rymercyble • Posted: 2024-08-18T23:37:14.197000+00:00
Original source

but i also never wrote tests in c++ so maybe its different here
rektbyfaith
08-18-2024, 11:37 PM #68

Archived author: Rymercyble • Posted: 2024-08-18T23:37:14.197000+00:00
Original source

but i also never wrote tests in c++ so maybe its different here

rektbyfaith
Administrator
0
08-19-2024, 12:02 AM
#69
Archived author: walkline • Posted: 2024-08-19T00:02:37.663000+00:00
Original source

You are probably writing tests in a dynamically typed language. I think you would agree that a crucial aspect of unit testing, when dealing with objects that have dependencies, is the use of mocks and stubs, right?
And if the object under test relies on a concrete implementation rather than an abstract dependency, you can’t inject a mock or stub (unlike in dynamically typed languages with duck typing).

As for singletons, they can complicate things further. Singletons make dependency injection more difficult, and its hard to isolate tests when you have global state.
rektbyfaith
08-19-2024, 12:02 AM #69

Archived author: walkline • Posted: 2024-08-19T00:02:37.663000+00:00
Original source

You are probably writing tests in a dynamically typed language. I think you would agree that a crucial aspect of unit testing, when dealing with objects that have dependencies, is the use of mocks and stubs, right?
And if the object under test relies on a concrete implementation rather than an abstract dependency, you can’t inject a mock or stub (unlike in dynamically typed languages with duck typing).

As for singletons, they can complicate things further. Singletons make dependency injection more difficult, and its hard to isolate tests when you have global state.

rektbyfaith
Administrator
0
08-19-2024, 12:16 AM
#70
Archived author: Rymercyble • Posted: 2024-08-19T00:16:03.598000+00:00
Original source

just to be clear im not saying its not making it more problematic but its still possible....ur tests wont be localized and isolated but u will still test if it works
rektbyfaith
08-19-2024, 12:16 AM #70

Archived author: Rymercyble • Posted: 2024-08-19T00:16:03.598000+00:00
Original source

just to be clear im not saying its not making it more problematic but its still possible....ur tests wont be localized and isolated but u will still test if it works

Pages (8): Previous 1 4 5 6 7 8 Next  
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)