User
- Added new type - No default constructor as I need to actually initialize somethings Users (unittests) - Added a rudimentary unittest
This commit is contained in:
parent
ad5eed9836
commit
b14f338695
|
@ -0,0 +1,25 @@
|
|||
module renaissance.server.users;
|
||||
|
||||
import core.sync.mutex : Mutex;
|
||||
|
||||
public struct User
|
||||
{
|
||||
private string username;
|
||||
private Mutex lock;
|
||||
|
||||
@disable
|
||||
private this();
|
||||
|
||||
this(string username)
|
||||
{
|
||||
this.lock = new Mutex();
|
||||
}
|
||||
|
||||
// TODO: Disallow parameter less construction?
|
||||
}
|
||||
|
||||
|
||||
unittest
|
||||
{
|
||||
User u = User("deavmi");
|
||||
}
|
Loading…
Reference in New Issue