mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
copy
This commit is contained in:
parent
8297a7251f
commit
d687261194
1 changed files with 7 additions and 6 deletions
|
@ -1,19 +1,20 @@
|
||||||
|
|
||||||
# Create a "black box" test
|
# Create a "black box" test case
|
||||||
|
|
||||||
This transcript shows GPT-4 creating a black box test case, without being given
|
This transcript shows GPT-4 creating a black box test case, without being given
|
||||||
access to the source code of the function being tested or *any* of the
|
access to the source code of the function being tested or *any* of the
|
||||||
code in the repo.
|
other code in the repo.
|
||||||
|
|
||||||
Instead, GPT is operating entirely off a
|
Instead, GPT is operating entirely off a
|
||||||
[ctags based repo map](https://aider.chat/docs/ctags.html)
|
[ctags based repo map](https://aider.chat/docs/ctags.html)
|
||||||
which provides details on all the symbols and function signatures in the repo.
|
which provides details on all the symbols and function signatures in the repo.
|
||||||
Using only the meta-data in the map, GPT is able to:
|
Using only the meta-data in the map, GPT is able to:
|
||||||
|
|
||||||
- Find the `cmd_add()` function signature
|
- Find the function signature of the `cmd_add()` function which the user wants a test case for.
|
||||||
- Determine that it is a method of the `Command` class, so will need to instantiate an instance to conduct the test.
|
- Determine that it is a method of the `Command` class, so the test case will need to instantiate an instance to conduct the test.
|
||||||
- Determine that creating a `Command` instance requires passing in `InputOutput` and `Coder` instances.
|
- Identify that creating a `Command` instance requires passing in `InputOutput` and `Coder` instances.
|
||||||
- Determines the arguments requited to instantiate the `InputOuput` instance.
|
- Figure out the arguments required to instantiate the `InputOuput` instance.
|
||||||
|
- The `Coder` class looks complex enough that it decides to use a `MagickMock`
|
||||||
|
|
||||||
The signature of `cmd_add()` doesn't have types, so GPT incorrectly guesses
|
The signature of `cmd_add()` doesn't have types, so GPT incorrectly guesses
|
||||||
that it wants a `list` of files. The user uses the `/run` command to
|
that it wants a `list` of files. The user uses the `/run` command to
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue