Bug #1855
FormatIntAlpha does not always give the right results.
| Status: | Approved | Start date: | 03/07/2018 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Miroslav Fidler | % Done: | 0% | |
| Category: | Core | Spent time: | - | |
| Target version: | Release 2019.1 |
Description
Test Case:
void TestFormatIntAlpha()
{
ASSERT(FormatIntAlpha(1) == "A");
ASSERT(FormatIntAlpha(2) == "B");
ASSERT(FormatIntAlpha(3) == "C");
ASSERT(FormatIntAlpha(25) == "Y");
ASSERT(FormatIntAlpha(26) == "Z"); // 26*1
ASSERT(FormatIntAlpha(27) == "AA");
ASSERT(FormatIntAlpha(51) == "AY");
ASSERT(FormatIntAlpha(52) == "AZ"); // 26*2
ASSERT(FormatIntAlpha(53) == "BA");
ASSERT(FormatIntAlpha(78) == "BZ"); // 26*3
ASSERT(FormatIntAlpha(26*26) == "YZ");
ASSERT(FormatIntAlpha(26*26 + 1) == "ZA");
ASSERT(FormatIntAlpha(26*26 + 26 - 1) == "ZY");
ASSERT(FormatIntAlpha(26*26 + 26) == "ZZ");
ASSERT(FormatIntAlpha(26*26 + 26+1) == "AAA");
ASSERT(FormatIntAlpha(26*26 + 26+2) == "AAB");
ASSERT(FormatIntAlpha(26*26 + 26+3) == "AAC");
ASSERT(FormatIntAlpha(26*26 + 26+26) == "AAZ");
ASSERT(FormatIntAlpha(26*26 + 26+26 + 1) == "ABA");
}
History
#1 Updated by Abdelghani Omari over 7 years ago
- File Format.cpp.patch
added
after more reflections, I propose this new patch :
#2 Updated by Abdelghani Omari over 7 years ago
- File deleted (
Format.cpp.patch)
#3 Updated by Abdelghani Omari over 7 years ago
- Target version set to Release 2018.1
#4 Updated by Zbigniew Rebacz over 7 years ago
- Target version changed from Release 2018.1 to Release 2019.1
#5 Updated by Abdelghani Omari over 7 years ago
- Description updated (diff)
#6 Updated by Abdelghani Omari over 7 years ago
- Status changed from Patch ready to Approved