2014-05-09 03:32:12 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <cxxtest/TestSuite.h>
|
|
|
|
|
2014-05-10 03:54:06 +08:00
|
|
|
#include "../xlnt.h"
|
2014-05-09 03:32:12 +08:00
|
|
|
|
|
|
|
class PasswordHashTestSuite : public CxxTest::TestSuite
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PasswordHashTestSuite()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void test_hasher()
|
|
|
|
{
|
2014-05-13 01:42:28 +08:00
|
|
|
TS_ASSERT_EQUALS("CBEB", hash_password("test"));
|
2014-05-09 03:32:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void test_sheet_protection()
|
|
|
|
{
|
2014-05-13 01:42:28 +08:00
|
|
|
protection = SheetProtection();
|
|
|
|
protection.password = "test";
|
|
|
|
TS_ASSERT_EQUALS("CBEB", protection.password);
|
2014-05-09 03:32:12 +08:00
|
|
|
}
|
|
|
|
};
|