GLIR - Testing

Below are recordings of the expected output of the various tests and examples included in the GLIR library. Refer to these videos to check if GLIR is working correctly with the terminal or simulator you choose to use. You can fullscreen the embedded videos or find the sources in Resources/ .

Tests

primitives.s:

A test for the GLIR_PrintLine, GLIR_PrintRect, and GLIR_PrintTriangle primitives. Checks printing of both minimal and larger size shape prints. Checks out of bounds printing. Checks stacking of shapes. Checks that the order that points are specififed for GLIR_PrintLine is irrelevant to the end drawing. Checks that providing a string to use for printing primitives works as intended.

Note that many shapes look much better when drawn larger. Small shapes will suffer from the restrictions of printing to a terminal (terminals and fonts are not square even if they are monospace, thus a square grid renders a rectangular shape) and the alignment of how characters are printed may look off.

restoreClear.s:

A test for the GLIR_RestoreSettings and GLIR_ClearScreen functionalities of the library. Alternates printing a line of unicode block characters and a line of text. The unicode characters are printed with different foreground colors and the text is printed on black background with different foreground colors. After a delay resets the terminal's color settings using GLIR_RestoreSettings and clears the screen using GLIR_ClearScreen. With the restored color settings, prints one final line of text which should be in the color of the default terminal settings.

defaultPrint.s:

A test for the GLIR_BatchPrint print code 1 functionality (standard print, default terminal settings). Meant to print three characters diagonally. The first character is printed with print code 4 and non-default terminal background and foreground colors. The next two characters are printed with print code 1 and should be printed with terminal default background and foreground colors regardless of the colors specified in their respective jobs.

Demos

colorDemo.s:

A demo meant to show off a subroutine created for GLIR called GLIR_ColorDemo. This demo attempts to print the 16-256 color gamut of the terminal. It prints 40 rows of 6 unicode full block char starting at color 16 and incrementing the color after each print. This demo's source code illustrates how easy it is to create beautiful displays on the terminal using GLIR's subroutines.

demo.s:

A demo meant to show off GLIR's basic functions (GLIR_BatchPrint, GLIR_PrintString, and GLIR_PrintCircle). First, iterates through printable characters and colors while performing a batch print between each iteration. Next, uses GLIR_PrintString to carve out a message (HI!). Lastly, performs a series of calls to GLIR_PrintCircle. The circle is meant to appear to spread towards the edges of the terminal eventually going off screen. Looking at this demo's source code can give one a good idea of how GLIR is meant to be started/stopped as well as how one can use the various methods of printing jobs.