Kartik K. Agaram
9b8e651dc7
Merge text0
2023-04-11 21:45:13 -07:00
Kartik K. Agaram
d27e22d6fe
Merge text.love
2023-04-11 21:44:21 -07:00
Kartik K. Agaram
658f96667b
primitives for writing tests
2023-04-11 21:33:33 -07:00
Kartik K. Agaram
3f90c92abb
Merge text0
...
This is the original reference for "freewheeling apps".
2023-04-09 21:03:12 -07:00
Kartik K. Agaram
04069f5fc8
Merge text.love
2023-04-09 19:17:23 -07:00
Kartik K. Agaram
d61ccafaa0
include a brief reference enabling many useful apps
2023-04-09 19:09:31 -07:00
Kartik K. Agaram
38c5014761
Merge text0
2023-04-02 16:50:08 -07:00
Kartik K. Agaram
247c09846c
Merge text.love
2023-04-02 16:46:31 -07:00
Kartik K. Agaram
29f1687f3c
avoid saving fragments in lines
...
Now we render lines one screen line at a time rather than one word at a
time.
I can't port the source side just yet; I need to fix hyperlinks first..
2023-04-01 21:44:27 -07:00
Kartik K. Agaram
d0d39797cf
show count of test failures
2023-04-01 20:40:47 -07:00
Kartik K. Agaram
f64f680f2b
no more Text allocations
...
Is it just my imagination, or does the app feel lighter and more fluffy?
2023-04-01 18:12:29 -07:00
Kartik K. Agaram
876d6298b4
App.width can no longer take a Text
...
In the process I discovered the horrible fact that Text.x allocates a new Text.
And it gets called (just once, thank goodness) on every single frame.
2023-04-01 18:12:29 -07:00
Kartik K. Agaram
4ab901c92e
get rid of to_text
...
I've been misunderstanding what Text objects are. They can render a lot
of text with a given line height, word wrap, colors in various places.
And I've been creating one for every word 🤦
Unwinding this will take some time. This is just a first baby step for
ad hoc text objects. Turns out I don't need to convert to Text to get
something's rendered width, just the Font can do that.
Thanks to the LÖVE Discord for educating me:
https://discord.com/channels/329400828920070144/330089431379869708/1091535487333826580
2023-04-01 16:12:55 -07:00
Kartik K. Agaram
9153d96951
Merge text0
2023-03-26 10:01:49 -07:00
Kartik K. Agaram
b529ea5dc1
Merge text.love
2023-03-26 09:59:38 -07:00
Kartik K. Agaram
eae5c9505c
bugfix: naming points
2023-03-26 09:36:41 -07:00
Kartik K. Agaram
7168ed5372
consistently save/restore state when running tests
...
It's not obvious, but this is a refactoring. There should be no behavior
changes.
2023-01-23 20:29:59 -08:00
Kartik K. Agaram
5017c41540
get rid of dubious heuristic helper
...
When we run into errors that aren't just assertion failures we should
just be able to look at the entire call stack.
2023-01-23 20:16:17 -08:00
Kartik K. Agaram
38bcc28be6
make run_test look like run_tests
2023-01-23 20:14:49 -08:00
Kartik K. Agaram
9957d30a84
stop including call stack for now
...
It risks blowing up the JSON payload to the driver too much, causing
truncation and more flakiness.
2023-01-23 20:13:19 -08:00
Kartik K. Agaram
2f1ec093ba
rename
2023-01-23 20:12:23 -08:00
Kartik K. Agaram
1b0460f726
Merge text0
2023-01-22 22:56:32 -08:00
Kartik K. Agaram
dcb5540f23
Merge text.love
2023-01-22 22:55:52 -08:00
Kartik K. Agaram
5cd5f54355
remove a condition
2023-01-22 22:12:58 -08:00
Kartik K. Agaram
4eb4312038
configurable error handler when running tests
2023-01-22 16:30:54 -08:00
Kartik K. Agaram
9f742b380e
save 2 more alternate formats for test failures
2023-01-22 16:30:09 -08:00
Kartik K. Agaram
bb84093bd6
rename
2023-01-22 16:15:42 -08:00
Kartik K. Agaram
1502790717
tweak format again
2023-01-22 16:14:12 -08:00
Kartik K. Agaram
b3f9dd9119
tweak format of test failures
...
Put the name of the test first. File and line number are less important,
and also our heuristics sometimes get them wrong.
2023-01-22 16:12:38 -08:00
Kartik K. Agaram
298cf2edc2
debug helper: run a single test
2023-01-21 21:47:21 -08:00
Kartik K. Agaram
51e6494384
keep some prints in the terminal for now
2023-01-21 21:47:00 -08:00
Kartik K. Agaram
070fba44a7
deduplicate an initialization
2023-01-20 23:45:03 -08:00
Kartik K. Agaram
2e7b3412d6
Merge text0
2023-01-20 23:23:46 -08:00
Kartik K. Agaram
d01f34c645
merge bugfix: show test failures
2023-01-20 23:21:59 -08:00
Kartik K. Agaram
f544131d00
Merge text0
2023-01-20 22:47:52 -08:00
Kartik K. Agaram
20e46a8b56
Merge text.love
2023-01-20 22:30:16 -08:00
Kartik K. Agaram
d13d0f9af0
clean up a print
2023-01-20 21:55:52 -08:00
Kartik K. Agaram
2a0a770c49
deduce test names on failures
2023-01-20 21:48:49 -08:00
Kartik K. Agaram
a28e57205d
link to default love.run for comparison
2023-01-20 21:07:59 -08:00
Kartik K. Agaram
46889593da
support running tests multiple times
...
We now collect multiple test failures, but that's just the first step.
2023-01-20 20:08:17 -08:00
Kartik K. Agaram
45032ebbbe
Merge text0
2022-12-23 20:17:16 -08:00
Kartik K. Agaram
98add5023f
Merge text.love
2022-12-23 20:11:51 -08:00
Kartik K. Agaram
2b3e09ca0f
make love event names consistent
...
I want the words to be easy to read, and to use a consistent tense.
update and focus seem more timeless; let's make everything like those.
2022-12-23 18:52:28 -08:00
Kartik K. Agaram
fdf4722d2a
app is now live, can communicate with driver
...
In the process I've also switched to a separate channel for run-time
errors. Now the driver won't struggle to get bindings out of the app
while it's throwing errors.
2022-11-27 14:28:18 -08:00
Kartik K. Agaram
2e68629898
Merge text.love
2022-11-27 13:21:46 -08:00
Kartik K. Agaram
816e3549b5
Merge text.love
2022-11-27 13:20:27 -08:00
Kartik K. Agaram
60e1023f0b
undo an ancient hack; be an idiomatic LÖVE app
2022-11-27 13:10:23 -08:00
Kartik K. Agaram
b64a60a509
bring back everything from commit a68647ae22
...
We only want to unwind the source editing.
2022-11-06 08:53:46 -08:00
Kartik K. Agaram
29140d24be
back to commit 8123959e52
without code editing
2022-11-03 21:45:25 -07:00
Kartik K. Agaram
89b30a62ef
support mouse clicks in file navigator
2022-09-18 01:26:20 -07:00
Kartik K. Agaram
287050d598
get rid of ugly side-effects in tests
2022-09-17 10:47:47 -07:00
Kartik K. Agaram
fdb35ce12b
bugfix: save modified files in save directory
...
scenario: open app from .love file, press ctrl+e
Before this change the source file showed up empty.
2022-09-05 12:39:28 -07:00
Kartik K. Agaram
e1c5a42f31
editing source code from within the app
...
integrated from pong.love via text.love:
https://merveilles.town/@akkartik/108933336531898243
2022-09-03 14:13:22 -07:00
Kartik K. Agaram
019a829279
make App.open_for_* look more like io.open
...
Now missing files will result in similar behavior: nil file handles.
2022-08-23 13:12:24 -07:00
Kartik K. Agaram
cfdac28e18
distinguish consistently between mouse buttons and other buttons
2022-08-23 09:36:08 -07:00
Kartik K. Agaram
fc9490c964
reclaim a couple more functions after tests
2022-08-19 10:29:48 -07:00
Kartik K. Agaram
6a6ff18916
hardcode some assumptions about how this app uses love
2022-08-06 09:51:32 -07:00
Kartik K. Agaram
0ac44f0756
formatting
2022-07-16 19:27:58 -07:00
Kartik K. Agaram
e4f9d50a55
a more radical attempt at ignoring nil y's
2022-07-13 09:31:54 -07:00
Kartik K. Agaram
75ec5c9087
.
2022-07-12 22:13:06 -07:00
Kartik K. Agaram
3850fbac35
make colors easier to edit
2022-07-11 23:18:26 -07:00
Kartik K. Agaram
3be413602a
bugfix: typing should delete highlighted text
...
The test harness now also mimics real usage more precisely.
2022-06-20 10:48:35 -07:00
Kartik K. Agaram
856c51212a
autosave slightly less aggressively
...
It might reduce wear and tear on disk, and losing 3 seconds of data
doesn't feel catastrophic (short of a C-z rampage).
Thanks to the love2d.org community for the suggestion:
https://love2d.org/forums/viewtopic.php?f=14&t=93173
2022-06-17 15:43:31 -07:00
Kartik K. Agaram
15acc38da9
test: autosave after any shape
2022-06-14 22:06:08 -07:00
Kartik K. Agaram
26640c9101
new test
...
For commit e4e12c77ad
which fixed a regression caused by commit
24a0d162ef
.
2022-06-12 10:59:42 -07:00
Kartik K. Agaram
059efba79d
override mouse state lookups in tests
...
If I'd had this stuff in my test harness earlier, two recent commits
would have failed tests and given me early warning:
ff88238ff1
ff88a2a927
2022-06-12 09:04:21 -07:00
Kartik K. Agaram
9ada7cf833
delete all tests once they've executed
2022-06-12 07:37:02 -07:00
Kartik K. Agaram
e8ff9f285f
redundant check
2022-06-12 07:35:52 -07:00
Kartik K. Agaram
1326914d7b
select text with shift + mouseclick
...
It's still a bit simple-minded. Most software will keep the first bound
fixed and move the second. Lines currently has the bounds in a queue of
sorts. But I have a test to indicate the behavior that is definitely
desired. We'll see if we need it to get more complex.
2022-06-04 14:54:40 -07:00
Kartik K. Agaram
73cc12047e
select text using mouse drag
...
Doesn't yet highlight while dragging.
2022-06-03 08:11:18 -07:00
Kartik K. Agaram
51f4f13ecc
test harness now supports copy/paste
2022-06-02 18:52:49 -07:00
Kartik K. Agaram
a9a133e6fb
update some App framework docs
2022-05-31 17:29:58 -07:00
Kartik K. Agaram
a603847d18
go through App in a couple more places
2022-05-29 16:37:31 -07:00
Kartik K. Agaram
c2eee640cf
test and App helper for mouse clicks
2022-05-25 13:38:33 -07:00
Kartik K. Agaram
442133fe7f
no, make sure to compute line width after screen dimensions
2022-05-25 13:35:32 -07:00
Kartik K. Agaram
fa103ca2e8
couple more tests
...
Along with the App helpers needed for them.
2022-05-25 12:59:12 -07:00
Kartik K. Agaram
a35b130f08
one bug I've repeatedly run into while testing with Moby Dick
...
https://www.hogbaysoftware.com/posts/moby-dick-workout
2022-05-23 17:39:00 -07:00
Kartik K. Agaram
6b10c94dd5
disable all debug prints
2022-05-23 15:38:42 -07:00
Kartik K. Agaram
c9434e4f17
snapshot
...
Why the fuck is this so fucking hard?
2022-05-23 15:22:16 -07:00
Kartik K. Agaram
4f6a324975
bugfix: don't rely on Screen_bottom1 while scrolling
...
Setting up the test just right to test the thing I want to test was a
rube goldberg machine of constants.
2022-05-23 08:52:13 -07:00
Kartik K. Agaram
37f1313b16
first successful pagedown test, first bug found by test
...
I also really need to rethink how people debug my programs. My approach
of inserting and deleting print() takes a lot of commitment. I need my
old trace-based whitebox testing idea. However, in my past projects I
never did figure out a good framework for tweaking how verbose a trace
to emit.
Perhaps that's too many knobs. Perhaps we just need a way to run a
single test with the most verbose trace possible. Then it's just a
matter of having the trace tell a coherent story? But even if the trace
stays out of program output in that situation, it's still in the
programmer's face in the _code_. Ugh.
Current plan: ship program with maximum tests and zero commented-out
prints. If you want to debug, insert prints. This is better than
previous, text-mode, projects just by virtue of the stdout channel being
dedicated to debug stuff.
2022-05-23 08:17:40 -07:00
Kartik K. Agaram
5d0e0f70c4
one more implication
2022-05-22 18:32:08 -07:00
Kartik K. Agaram
f421e1daa5
basic test-enabled framework
...
Tests still have a lot of side-effects on the real screen. We'll
gradually clean those up.
2022-05-22 18:29:52 -07:00
Kartik K. Agaram
555726a87d
rename
2022-05-22 18:23:04 -07:00