History log of /haiku/src/tests/kits/storage/MimeSnifferTest.cpp
Revision Date Author Comments
# 77aa0e2a 11-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Fix build of unit-tests with gcc4.


# 155b583a 09-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed unit tests build for platforms libbe_test and r5. Only randomly tested
a few whether they actually work.
New pseudo target "unittests", which builds all unit tests for the currently
set TARGET_PLATFORM. They are placed in generated/tests/<platform>/unittests.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14791 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 789d7cbe 24-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Fixed parse(NULL,...) test descrepancy


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1155 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 344a28b8 23-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added debug output to understand why the parser test fails.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a6e96214 28-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Killed a warning dead.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@928 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 09d84e61 12-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Changed StorageKit namespace to BPrivate::Storage
+ Changed Sniffer namespace to BPrivate::Storage::Sniffer


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f6ca756 10-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed failing "quotes in unquoted string" tests, as quotes are now allowed in unquoted strings


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@700 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3035279e 10-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added case-insensitivity tests


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b657eab3 09-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Fixed the uber scanner test yet again (this time wrt
NULL characters embedded in the token strings).
+ Added a number of sniffing tests. The rules returned
by the parser appear to sniff properly now.

Incidentally, our sniffer supports conjunctions, i.e the rule

1.0 ('abc') [9] ('xyz')

is equivalent to the rule

1.0 ('abc______xyz' & 0xFFF000000FFF)

This is different than the R5 sniffer, which doesn't reject
rules like the former, but appears to ignore all expressions
in the rule except for the first, i.e. it would treat the first
rule as

1.0 ('abc')

The only problem I can see with this is if someone for
some reason wrote such a rule with multiple expressions
for use with the R5 sniffer. It would likely work differently
with ours. I'm going to search my MIME database and see
if any such rules exist. If so, it'll be easy to switch to the
R5 way of doing things.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be1cf3b1 08-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added a number of tests
+ Learned the concept of base 8 again and fixed an octal literal. I hate octal.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@651 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0b6140dc 07-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added a mean test to the scanner tests
+ Patched up the parser tests so they actually test something
now, and accounted for the variations between the R5 error
messages and our error messages where applicable.
+ Added a few extended notation floating point tests to the
parser tests


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a06e9158 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Used to be ParserTest.*
+ Added some scanner tests
+ Parser tests still do very little testing
+ The "1e-25 ('ABCD')" test, which apparently fails with
R5's CheckSnifferRule(), has been commented out, as our
version accepts it and I can't currently figure out why it
would be an invalid sniffer rule.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@602 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77aa0e2a5ef8e6d00570dbeb7a12aeb23e9e5cf0 11-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Fix build of unit-tests with gcc4.


# 155b583ac369749fdfae25f419056389ec7eb16e 09-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed unit tests build for platforms libbe_test and r5. Only randomly tested
a few whether they actually work.
New pseudo target "unittests", which builds all unit tests for the currently
set TARGET_PLATFORM. They are placed in generated/tests/<platform>/unittests.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14791 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 789d7cbe2d54fffc76737fd97b759ed2950420c3 24-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Fixed parse(NULL,...) test descrepancy


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1155 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 344a28b86f052dc7680a1bfe48469777d8438468 23-Sep-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added debug output to understand why the parser test fails.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a6e96214edf8a5c2c460298c223bfc3c1461c564 28-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Killed a warning dead.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@928 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 09d84e61b6c2629d253dce1e7d7e944943d3e40e 12-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Changed StorageKit namespace to BPrivate::Storage
+ Changed Sniffer namespace to BPrivate::Storage::Sniffer


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@714 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f6ca7567b493bf2e76f51ca236b8943cb20ecd9 10-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed failing "quotes in unquoted string" tests, as quotes are now allowed in unquoted strings


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@700 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3035279e845caa88035f08e26bb0bbd7f8a85678 10-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Added case-insensitivity tests


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@687 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b657eab3cffcf8f595db739e1c039e19515d02ae 09-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Fixed the uber scanner test yet again (this time wrt
NULL characters embedded in the token strings).
+ Added a number of sniffing tests. The rules returned
by the parser appear to sniff properly now.

Incidentally, our sniffer supports conjunctions, i.e the rule

1.0 ('abc') [9] ('xyz')

is equivalent to the rule

1.0 ('abc______xyz' & 0xFFF000000FFF)

This is different than the R5 sniffer, which doesn't reject
rules like the former, but appears to ignore all expressions
in the rule except for the first, i.e. it would treat the first
rule as

1.0 ('abc')

The only problem I can see with this is if someone for
some reason wrote such a rule with multiple expressions
for use with the R5 sniffer. It would likely work differently
with ours. I'm going to search my MIME database and see
if any such rules exist. If so, it'll be easy to switch to the
R5 way of doing things.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@663 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be1cf3b1bef7af8ba0d97845c417cdb303d5ae2a 08-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added a number of tests
+ Learned the concept of base 8 again and fixed an octal literal. I hate octal.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@651 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0b6140dc379f13ff3c3b34aec0e9678d5419770d 07-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

+ Added a mean test to the scanner tests
+ Patched up the parser tests so they actually test something
now, and accounted for the variations between the R5 error
messages and our error messages where applicable.
+ Added a few extended notation floating point tests to the
parser tests


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a06e9158c76999bd1f59771b2e9ba416a5a97b23 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Used to be ParserTest.*
+ Added some scanner tests
+ Parser tests still do very little testing
+ The "1e-25 ('ABCD')" test, which apparently fails with
R5's CheckSnifferRule(), has been commented out, as our
version accepts it and I can't currently figure out why it
would be an invalid sniffer rule.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@602 a95241bf-73f2-0310-859d-f6bbb57e9c96