aboutsummaryrefslogtreecommitdiff
path: root/src/unit (follow)
AgeCommit message (Collapse)Author
2009-02-08So many updates. I recommend using the new FString iterators instead of directMike Buland
indexing. It is now many times faster, and requires less overhead. Also, more stuff iterator related in every class. More on that later.
2009-01-07Corrected a couple of places where std:: classes were being used and shouldn'tMike Buland
have been. Also made the Unit tests actually use expected values, so you can mark a test as "expected fail" and it'll know. It also prints out cute reports at the end of each run.
2009-01-07Only two real changes. First, Bu::FString and Bu::FBasicString are in differentMike Buland
files. This won't affect any programs at all anywhere. This will just make it easier to maintain and extend later. You still want to include "bu/fstring.h" and use Bu::FString in code. The other is kinda fun. I created a special format for unit tests, they use the extension .unit now and use the mkunit.sh script to convert them to c++ code. There are some nice features here too, maintaining unit tests is much, much easier, and we can have more features without making the code any harder to use. Also, it will be easier to have the unit tests generate reports and be run from a master program and the like.
2008-12-31Wow, that was a freaky bug. Turned out to not have anything to do with theMike Buland
size of the table, it had to do with using non pointer types for the key (some more complex types worked as well, probably because of lazy memory collection) and then using the [] indexing operators. You wound up with pointers to local variables that didn't exist by the end of the assignemnt operator. Strange, but I didn't actually use references inside of all of the Bu::Hash accessor functions, that means in cases where more complex variables are used as keys (like Bu::FString) it was making several copies of them per operation and destroying them all immediately. Now it will be even faster and use much less memory. Good catch, David.
2008-12-30david - i found a strange hash bug, and made a unit test to reproduce it ↵David
("insert3")... with a hash of type Bu::Hash<int, Bu::FString>, when the size of the hash reaches certain points (11, 23, 46, 94, etc...), it seems to reset itself and not have any data in it...
2008-12-29Corrected the premature end of stream read corner case in Taf...it was freakingMike Buland
out and allocating all memory, now it just throws an exception.
2008-12-29Fixed some horror inside the Taf writer. It had a strange corner case whenMike Buland
adding a property to a group that had a name but an empty value. Also added a isEmpty() function to Bu::FString, finally.
2008-12-22Hey, corrected a minor issue in Bu::FString. Turns out C++ is hardass enoughMike Buland
that we need a concatination operator for both const chr * and chr *. This fixed a suprising number of problems.
2008-12-20All of the basic, core workings of the Cache are complete, and tested. EvenMike Buland
added some more tests and whatnot. A lot happened, but I can't remember everything. Also, Bu::File reports errors in more error cases.
2008-12-12All of those changes I thought I'd already committed. The taf writer handlesMike Buland
binary data much better, actually escaping it properly and not stopping on null. Bu::FString has an iterator, it's actually just a raw datatype, but it may have more function later, so careful assuming that it's a char and using it in any non-iterator like way. Also augmented the taf unit test, and added the Bu::CacheCalc base class, the rest of the simple develpment cycle will happen between here and project hhp.
2008-11-11david - added operator= and copy constructor to Bu::Array, and updated unit ↵David
tests to test it
2008-10-08Ok...corrected a problem with new block allocation in nids, and it no longerMike Buland
goes into an infinite loop while doing certain kinds of read. Also, it zeros out new blocks to make things easier to cope with in the hex editor, it'll probably also compress better. I also fixed Bu::MemBuf so that you can now write to arbitrary places mid-stream.
2008-10-02More changes to File...turns out tempFile always opens the file for reading andMike Buland
writing...so...what more do you need? It was ignoring the open flags you gave it anyway.
2008-10-01This commit is sure to break things. This should be a very, very minor change.Mike Buland
What changed API-Wise: - I deleted a constructor in Bu::File that shouldn't have been used anyway. - I changed it from using fopen style mode strings to using libbu++ style mode flags. Check the docs for the complete list, but basically instead of "wb" you do Bu::File::Write, and so on, you can or any of the libbu++ flags together. There is no binary/text mode, it just writes whatever you tell it to verbatim (binary mode). Lots of extras are supported. Nothing else should have changed (except now the file stream is unbuffered, like all the other streams). Sorry if this breaks anything, if it's too annoying, use the last revision for a while longer.
2008-10-01Ok, NIDS is getting better and better, and I went ahead and cleaned up someMike Buland
exception related code that's been annoying me. You should no longer have to include any exception header explicitly for normal operations, every class that has it's own exception to throw defines it in it's own headers. This may break some code that uses libbu++, but it's an easy fix, just delete the include for exceptions.h. Sometime soon I would also like to move from Bu::ExceptionBase to Bu::Exception, but that will affect a lot more code than this change did.
2008-09-24Something may be wrong.Mike Buland
2008-09-24Wow, I realized that the Bu::Array class wasn't finished, and went ahead andMike Buland
wrote it, it's pretty feature complete, index, append, iterators. You can't delete anything yet, exactly, but that's tricky in an array anyway, basically you just want to be able to remove elements from the end, and that's halfway there. Also, fixed some documentation and minor issues in Bu::Set, and made the Bu::Archive include fewer other classes while still defining archive oprators for them. I think I may yet move those into the headers for the classes that are being stored instead, makes a little more sense. I also would like to move the Exception classes out of the exceptions.h file and into the appropriate class' files'. There still should probably be a couple of general ones in there, or maybe just in exceptionbase.h, we'll see.
2008-09-24Added a getSubStr function to Bu::FString, and more tests to the fstring unitMike Buland
test.
2008-09-15Whoa! Loads of NIDS work. It actually compiles, runs, and I'm optimizing theMike Buland
hell out of it. Good times, everyone. This is a major chunk for congo, and the new optimizations should be good.
2008-09-11Fixed some whacky old FBasicString hikinx. Basically it supports all the basic,Mike Buland
expected operators now, like plus. It was annoying without them.
2008-09-04XML is important, I guess...Mike Buland
2008-06-07Fixed the bugs in the archive system. Both the List container and FString hadMike Buland
inconsistancies when archiving compared to their STL counterparts, they are now compatible on every system I can imagine. Also, List now uses a long instead of an int for sizing, and the other containers should as well. I'll check on that later. That means that the files will all be larger on a 64 bit system, but such is life. The same thing happens when you use STL classes. There may be other inconsistancies down the road, we'll see.
2008-06-07This seems to have done the trick, on the 32 bit platform, anyway. Turns outMike Buland
it's a bad idea to rely on the intNN_t typedefs. I enumerated all non-pointer primitives in c++ (except void, you can't store things in a void), and it works great. I also discovered C and C++ actually have unsigned char, signed char, and char, which are all distinct types. It supports all three now. In addition, I got rid of all of the specific && operators, the general one covers it all. Also, the unit tests all pass for now. Now to try it on the 64bit system.
2008-06-07This is a testing version. Nothing should be broken, but I won't gurantee it.Mike Buland
I wouldn't update to this just yet, if you have problems, back off a rev. I'm trying to update the code to work on both 32bit, and 64bit systems, and hopefully anything else that comes along. Currently some of the archive code is broken, testing must be done on both archetectures.
2008-02-07Just updated the copyright date.Mike Buland
2007-12-11Fixed the bu directory, now the code should compile and be usable evenMike Buland
installed. That was odd. Anyway, also set props on the bu, unit, and test directories so that the contents won't be listed on svn status.
2007-11-24Alright, *now* remove works.Mike Buland
2007-11-23Bu::FString now has insert and remove functions, yay!Mike Buland
2007-11-15Final changes moving to the actually liscense-ified version, plus I fixed aMike Buland
compile error I introduced last commit.
2007-11-15Added liscense info at the front of many, many files. Debating the old files.Mike Buland
2007-10-20Just marked Bu::FString::c_str as deprecated, don't use it, it'll go away later.Mike Buland
2007-08-14Fixed a crash in the FString::prepend function on a null string corner case.Mike Buland
Also added more tests to the FString unit tests and switched the ParamProc to using FString instead of std::string, this will break a few programs in very minor ways, a few seconds each to fix, I'd say.
2007-07-18Incorporated a patch contributed by Brandon CS Sanders that allows libbu++ toMike Buland
compile under OSX. So far, no problems with anything else, it looks like build and nango both build without problems, libbu++ is truly becoming a full cross- platform toolkit.
2007-07-10OK, this time I really fixed it so that it compares raw strings and FStringsMike Buland
the right way.
2007-06-27The taf system is new and improved. The writer works, we added C++ styleMike Buland
comment blocks, and it retains the order of all nodes.
2007-06-27The MemBuf works just fine, although it still can't over-write data in theMike Buland
buffer.
2007-06-15david - wrote two silly unit tests... David
2007-04-10I did it, the streams don't start with an S now.Mike Buland
2007-04-10Fixed a warning in the SFile test, and added std::list support to the archive.Mike Buland
I guess I should write a test for it too... I'm also thinking of removing the S from the front of the stream children.
2007-04-10Wrote some cute file unit tests, and added some more error reporting to SFile.Mike Buland
Also fixed the stream system to use void * pointers instead of char *.
2007-04-10Well, we've got the basis of a workable unit test harness thing. There shouldMike Buland
be a few more add-ons to it, but it works just fine, and eventually it should cover command line options and creating logs, and possibly even provide output functionality so that output from tests can be logged and kept track of well.
2007-04-03Ok, no code is left in src, it's all in src/old. We'll gradually move code backMike Buland
into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier.
2006-06-29Completely switched over to the much simpler, nicer pymake. Things look great,Mike Buland
and the old Makefile may soon fall into disrepair. To use the old one, which should almost always be able to build at least thi library, call: make -f Makefile.legacy The new Makefile just calls pymake
2006-06-28Entities now work in the xml processor the way they should, you can define yourMike Buland
own, use the 5 builtin ones (gt, lt, apos, quot, amp), and even create your own. The parser now skips any text definition at the top, which is fine for most xml that you get these days. I think if we ever make the break to full compliance we'll need to make a new parser from scratch.
2006-05-26Added the first of many unit tests. For now the unit tests are just built withMike Buland
everything else in the all target of the makefile, which is fine, but relies on CppTest, which can be found at http://cpptest.sf.net Also fixed some things I've been meaning to get to for a while in the xml system, including a few bugs that will make coping with malformed data not hang other programs, and do the error reporting in a nice way.