summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2012-05-30Fix type error in test_sqlite.ccDaniel Hartwig1-3/+3
2012-05-11Support really big files in the download systemDaniel Hartwig1-12/+0
This follows recent changes in apt which added support for files greater than several gigabytes in size -- using the 'unsigned long long' type to store the file size. Changelog download is restored as a result of this. Closes: #669569 LP: #824708
2012-04-25Include build of gtest when building gmockDaniel Hartwig1-3/+3
2012-03-23Update tests for recent cmdline_download_progress changesDaniel Hartwig1-13/+13
2012-02-07Fix typo in tests/Makefile.am.Daniel Hartwig1-1/+1
2012-02-06Leave out libgmock sources from dist files.Daniel Hartwig1-1/+1
2012-01-15Kurt Roeckx <kurt@roeckx.be> for NMU of version 0.6.4-1.2Manuel A. Fernandez Montecelo1-5/+5
2011-07-23Eliminate an unused variable.Daniel Burrows1-3/+4
2011-07-23Modify autoconf/automake scripts to handle gmock changes.Daniel Burrows1-1/+11
2011-04-10Fix serializing ?term-prefix.Daniel Burrows1-0/+3
Also added ?term-prefix to the test suite (oops).
2011-04-06Eliminate a whole pile of unused local variables.Daniel Burrows1-15/+1
2011-04-05Tighten pattern parsing tests.Daniel Burrows1-1/+7
* Verify that ~ parses as a name matcher, not a term matcher. * Verify that a top-level bare string that's not ~ parses as a name matcher.
2011-04-02Nuke the scons build scripts.Daniel Burrows1-158/+0
These never worked out as well as I intended, and all indications were that they would be a maintenance burden...or just bitrot. Fully parallel builds are nice, but my builds are pretty quick on my 8-core box even with the artificial chokepoints that automake induces.
2011-03-30Update tests for the new behavior of SizeToStr().Daniel Burrows2-26/+26
SizeToStr() now outputs a space between its nubmer and its units. Arguably this is a case of tests that are too fragile: I should be able to cut that dependency with a mock and thus avoid being broken by changes to how SizeToStr() behaves.
2011-03-30Fix compile errors caused by changes in the libapt API.Daniel Burrows1-5/+5
Whoever's in charge of libapt these days apparently doesn't believe in backwards compatibility. Or in documenting how their APIs are to be used, or why names are deprecated </gripe>
2010-08-26Fix the behavior of OFF_LEVEL in the logging code.Daniel Burrows1-6/+24
Setting a category to OFF was supposed to mean that nothing in that category was logged. Instead, it logs everything, and logging a message at OFF disables it (which is ... sort of useless). Fixed the behavior, and the tests, to behave correctly. Setting a log category's level to OFF suppresses all its messages now.
2010-08-06Write a routine to subtract timevals.Daniel Burrows1-2/+94
2010-07-10Make display_and_advance work even when the output isn't a terminal.Daniel Burrows1-0/+24
Also documented this new behavior and wrote a unit test for it.
2010-07-10It's no longer necessary to explicitly mark newline() as unexpected, since ↵Daniel Burrows1-5/+0
we're using a strict mock now. Not only is it unnecessary, it was generating confusing error messages if newline() was expected but occurred out of order.
2010-07-10Make download_status_display part of the command-line code.Daniel Burrows2-189/+58
It's really just a hack to break the command-line implementation up in a way that's more amenable to unit-testing; it doesn't belong in the generic view interface.
2010-07-10Add a routine on download_progress that's invoked when a file is skipped ↵Daniel Burrows1-0/+62
because it's already downloaded.
2010-07-10Delete an obsolete comment that snuck into my earlier roll-up patch.Daniel Burrows1-11/+0
2010-07-10Add a complete() routine to the download progress view that's invoked when ↵Daniel Burrows1-0/+5
the whole download process is complete. Necessary to fully expose the events generated by download_signal_log.
2010-07-10Flesh out the implementation of the download progress display and its tests.Daniel_Burrows@alumni.brown.edu4-24/+1133
2010-07-10Split the teletype mock's constructors into default/nice/strict variants too.Daniel Burrows2-3/+3
2010-07-10Make transient_message a Mock and use its strict variant.Daniel Burrows2-2/+2
2010-07-10Make combining_terminal_output implement the same interface as Mock.Daniel Burrows3-3/+3
I can't use Mock directly because this class already inherits from Mock, so there would be confusion about which static members to expose (well, I could resolve it, but that's about as much trouble as implementing the interface directly).
2010-07-10Use Mock to implement terminal_with_combined_output.Daniel Burrows1-1/+1
2010-07-10Make the terminal_metrics mock a Mock instance and use its strict variant ↵Daniel Burrows3-3/+3
everywhere.
2010-07-10Make the terminal_locale mock a Mock instance and use its strict variant in ↵Daniel Burrows3-3/+3
the tests.
2010-07-10Split the "terminal" interface into several interfaces that each export one ↵Daniel_Burrows@alumni.brown.edu4-179/+99
piece of its functionality. This will make some of the tests easier to write, since often some of the code requires just the ability to read the screen width, or just the ability to read input from the terminal. Splitting the terminal interface means no need to mock out the parts that aren't used.
2010-07-03Move the search input controller and view classes over to generic/.Daniel_Burrows@alumni.brown.edu3-19/+12
As a side effect, this creates a "controllers" directory in the generic tree, and removes the now-empty GTK+-specific controller and view directories. The README files are moved over to the generic locations and tweaked to be correct for their new home.
2010-07-03Move the throttle object to src/generic/util.Daniel_Burrows@alumni.brown.edu2-13/+13
2010-07-03Move the core command-line progress view interface to generic/views.Daniel_Burrows@alumni.brown.edu3-23/+30
2010-07-03Fix up the SConscript files.Daniel_Burrows@alumni.brown.edu1-0/+2
2010-07-02Remove the now-obsolete preserve_and_advance() routine.Daniel Burrows1-13/+0
Its only real purpose was to do what display_and_advance() does better -- i.e., display a durable progress notification and move to the next line.
2010-07-02Use display_and_advance() for the standard progress meters.Daniel Burrows1-45/+17
2010-07-02Add a routine on transient_message to display a non-wrapped message and move ↵Daniel Burrows1-0/+46
to the next line. This should be useful for things like printing a status message alongside some sort of progress indicator -- set_text() followed by advance() is not really ideal since it truncates the line.
2010-06-30Add a view interface for displaying the download progress and an ↵Daniel_Burrows@alumni.brown.edu3-0/+109
implementation for showing the download progress at the command line and a stub implementation. This is mostly just a streamlining of the apt interface, but putting the code behind a clean view will also make it much more testable.
2010-06-19Don't try to link GTK+-related code into the tests if the GTK+ frontend ↵Daniel Burrows1-2/+5
isn't being built.
2010-06-19Don't try to test the search input controller if the GTK+ frontend wasn't built.Daniel Burrows1-0/+4
If the GTK+ frontend isn't built, neither is the controller, so the test won't build.
2010-06-18Explicitly include gmock/gtest -- they should be picked up by another ↵Daniel Burrows1-0/+3
include file, but I prefer listing all the dependencies anyway.
2010-06-18Extract the declarations of the global pointers to apt structures into a ↵Daniel Burrows1-25/+10
separate file to reduce test dependencies. No reason for tests to pull in half of src/generic/apt just because a module linked into the test happens to reference a global pointer.
2010-06-18Re-enable all the unit tests.Daniel Burrows1-2/+2
It looks like I disabled two of them to speed up testing, then accidentally committed that change.
2010-06-15Add support to the command-line progress display object for showing that the ↵Daniel Burrows3-56/+454
current task is done, and for displaying progress the way classic apt tools do. The new code supports both "[ 40%] Task" and "Task... 40%" display styles, and when a task is complete the code will either erase it (default) or advance to the next terminal line (like apt-get does). These behaviors are controlled by apt options.
2010-06-15Make the testing of search progress throttling hopefully more robust.Daniel Burrows1-15/+16
Instead of relying on knowing how many times each routine checks for throttling, I just fully disable and fully enable throttling depending on whether the next call should be throttled or not.
2010-06-10Put some mock expectations that should be in sequence in the scope of ↵Daniel Burrows1-22/+67
InSequence(). Note that calls to get_screen_width() are left off, since we don't care when it happens and it can happen any number of times.
2010-06-10Add support in the transient message for making a message permanent and ↵Daniel Burrows2-2/+14
advancing to the next line. i.e., for explicitly outputting a newline. The main advantage of this is that it lets me give the progress display a mode that emulates the old apt progress display (specifically, the behavior that completed steps remain visible).
2010-06-10Fix the teletype mock to only output set_last_line() when the last line has ↵Daniel Burrows1-0/+22
actually changed. In particular, this means that outputting "\n" after a flush won't redundantly update the last line.
2010-06-10Don't show any output from the transient message object if the output device ↵Daniel Burrows1-4/+51
isn't a terminal.