JoystreamClassic / extension-cpp

C++ libtorrent extension library
MIT License
0 stars 3 forks source link

Add unit test for alert id uniqueness #14

Open bedeho opened 7 years ago

bedeho commented 7 years ago

Background

Each of our custome alerts attempts to define its own alert id, which is used to distinguish alert types when you encode alerts out of c++, so that the original types are no longer available. We do this in joystream-node.

Problem

Over time it becomes easy to forget to maintain this, as tests are added and removed, as in #13 .

Solution

Add unit test which simply does runtime check that they are all unique, it could be a nice start to our unit tests. I started on integration tests here https://github.com/JoyStream/extension-cpp/pull/1, but we still have no unit tests.