Skip to content

Commit ab644f3

Browse files
committed
Update documentation
1 parent d0914a6 commit ab644f3

File tree

8 files changed

+46
-13
lines changed

8 files changed

+46
-13
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ compress3:
145145

146146
$(GTEST):
147147
cmake -S googletest -B googletest/build
148+
- $(MAKE) -C googletest/build
148149
$(MAKE) -C googletest/build
149150

150151
-include $(addprefix .deps/,$(subst /,_,$(OBJS_BUILD:.o=.d)))

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Check out the code from Git:
4444

4545
git clone https://github.com/bisqwit/that_terminal
4646
cd that_terminal
47+
git checkout origin/hy -b hy
4748
git submodule update --init --recursive # Do not forget this step!
4849

4950
To compile, type `make -j4`. To run, type `./term` after compiling.
@@ -66,12 +67,12 @@ significantly.
6667
## Documentation
6768

6869
* [Doxygen autogenerated documentation](https://bisqwit.github.io/that_terminal/)
70+
* [Architectural description](doc/architecture.md)
71+
* [Working time log](doc/timeusage.md)
6972
* [Supported keyboard inputs](doc/inputs.md)
7073
* [Supported fonts](doc/fonts.md)
7174
* [Supported escape codes](doc/escapes.md)
72-
* [Testing](doc/testing.md)
73-
* [Working time log](doc/timeusage.md)
74-
* [Architecture](doc/architecture.md)
75+
* [Testing](doc/testing.md) ([test results](doc/test-report.txt), [coverage](https://bisqwit.github.io/that_terminal/cov/index.html))
7576

7677
## Instructions of use
7778

doc/architecture.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,32 @@ and it uses libSDL2 for rendering and for event handling.
3131

3232
## Application logic
3333

34+
```mermaid
35+
classDiagram
36+
class ForkPTY
37+
class TerminalWindow
38+
class Window
39+
class UI
40+
class FontPlan
41+
ForkPTY : Open(width, height)
42+
ForkPTY : Send(string)
43+
ForkPTY : Recv() string
44+
TerminalWindow : Write(string)
45+
Window : cells
46+
Window : blank
47+
Window : Render(fontwidth,fontheight, pixels)
48+
FontPlan : Create(fontwidth,fontheight, firstchar, numchars)
49+
FontPlan : LoadGlyph(index, scanline, renderwidth) Glyph
50+
Window <-- FontPlan
51+
UI <--> ForkPTY
52+
ForkPTY --> TerminalWindow
53+
TerminalWindow --> Window
54+
Window --> UI
55+
FontsInfo --> FontPlan
56+
ParseSimilarities --> FontPlan
57+
GlyphList --> FontsInfo
58+
```
59+
3460
The core of the application is founded upon three classes:
3561
[ForkPTY](../src/tty/forkpty.cc),
3662
[TerminalWindow](../src/tty/terminal.cc)

doc/testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Summary:
1515
[==========] 65 tests from 16 test suites ran. (142382 ms total)
1616
[ PASSED ] 65 tests.
1717

18+
To redo tests, do `make test`. The output will be saved to `doc/test-report.txt`.
19+
1820
## Coverage testing
1921

2022
Coverage testing is performed using a GCOV.
@@ -26,6 +28,8 @@ Additionally, coverage-testing is performed for the unit-testing binary.
2628
The testing results can be found here:
2729
* [Test results](https://bisqwit.github.io/that_terminal/cov/index.html)
2830

31+
To redo tests, do `make test`. The output will be saved to `doc/doxygen/docs/cov/`.
32+
2933
## Practical testing
3034

3135
This software is used for video making purposes by the author from time to time.

src/ctype.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -619,13 +619,13 @@ TEST(ctype, charconv_tests)
619619
}
620620
TEST(ctype, count_indent)
621621
{
622-
EXPECT_EQ(CountIndent(U""), 0);
623-
EXPECT_EQ(CountIndent(U"s t "), 0);
624-
EXPECT_EQ(CountIndent(U" s t "), 4);
625-
EXPECT_EQ(CountIndent(U" "), 4);
626-
EXPECT_EQ(CountIndent(U" ", 1), 3);
627-
EXPECT_EQ(CountIndent(U" s t ", 5), 4);
628-
EXPECT_EQ(CountIndent(U" s t ", 7), 2);
629-
EXPECT_EQ(CountIndent(std::u32string(150000, U' ')), 150000);
622+
EXPECT_EQ(CountIndent(U""), 0u);
623+
EXPECT_EQ(CountIndent(U"s t "), 0u);
624+
EXPECT_EQ(CountIndent(U" s t "), 4u);
625+
EXPECT_EQ(CountIndent(U" "), 4u);
626+
EXPECT_EQ(CountIndent(U" ", 1), 3u);
627+
EXPECT_EQ(CountIndent(U" s t ", 5), 4u);
628+
EXPECT_EQ(CountIndent(U" s t ", 7), 2u);
629+
EXPECT_EQ(CountIndent(std::u32string(150000, U' ')), 150000u);
630630
}
631631
#endif

src/main.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ namespace
174174
int main(int argc, char** argv)
175175
{
176176
/* Set up */
177+
argc=argc;
177178
SaveArg0(argv[0]);
178179
SetTimeFactor(TimeFactor);
179180

src/rendering/cset.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ TEST(TranslateCSet, one_ok)
6666
for(unsigned a=0; a<0x5F; ++a) EXPECT_EQ(TranslateCSet(a,1), a);
6767
for(unsigned a=0x7F; a<512; ++a) EXPECT_EQ(TranslateCSet(a,1), a);
6868
for(unsigned a=0x5F; a<0x7E; ++a) EXPECT_NE(TranslateCSet(a,1), a);
69-
EXPECT_EQ(TranslateCSet(0x61, 1), 0x2592);
69+
EXPECT_EQ(TranslateCSet(0x61, 1), 0x2592u);
7070
}
7171
#endif

src/rendering/person.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,6 @@ TEST(person, pose_varies)
229229
frames.insert( PersonFrame() );
230230
AdvanceTime(1.0 / 32.0);
231231
}
232-
EXPECT_EQ(frames.size(), 2);
232+
EXPECT_EQ(frames.size(), 2u);
233233
}
234234
#endif

0 commit comments

Comments
 (0)