Mercurial > dillo_port1.3
changeset 2016:8cf59505bd0a
tests cleanup
author | corvid <corvid@lavabit.com> |
---|---|
date | Sat, 14 May 2011 06:45:42 +0000 |
parents | 025c664fa44f |
children | 76ee4630fd50 |
files | doc/dw-usage.doc test/dw_anchors_test.cc test/dw_border_test.cc test/dw_example.cc test/dw_find_test.cc test/dw_images_scaled.cc test/dw_images_scaled2.cc test/dw_images_simple.cc test/dw_links.cc test/dw_links2.cc test/dw_lists.cc test/dw_resource_test.cc test/dw_table.cc test/dw_table_aligned.cc test/dw_ui_test.cc test/form.cc |
diffstat | 16 files changed, 29 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/dw-usage.doc Sat May 14 06:43:17 2011 +0000 +++ b/doc/dw-usage.doc Sat May 14 06:45:42 2011 +0000 @@ -88,6 +88,8 @@ fontAttrs.size = 14; fontAttrs.weight = 400; fontAttrs.style = dw::core::style::FONT_STYLE_NORMAL; + fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = dw::core::style::FONT_VARIANT_NORMAL; \endcode Now, the font can be created:
--- a/test/dw_anchors_test.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_anchors_test.cc Sat May 14 06:45:42 2011 +0000 @@ -122,6 +122,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; StyleAttrs styleAttrs; styleAttrs.initValues (); @@ -156,7 +157,7 @@ wordStyle->unref (); headingStyle->unref (); for (int i = 0; i < 10; i++) - delete buttonLabel[i]; + free(buttonLabel[i]); delete layout; return errorCode;
--- a/test/dw_border_test.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_border_test.cc Sat May 14 06:45:42 2011 +0000 @@ -59,6 +59,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_example.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_example.cc Sat May 14 06:45:42 2011 +0000 @@ -51,6 +51,7 @@ fontAttrs.weight = 400; fontAttrs.style = dw::core::style::FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = dw::core::style::FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color =
--- a/test/dw_find_test.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_find_test.cc Sat May 14 06:45:42 2011 +0000 @@ -99,6 +99,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; StyleAttrs styleAttrs; styleAttrs.initValues ();
--- a/test/dw_images_scaled.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_images_scaled.cc Sat May 14 06:45:42 2011 +0000 @@ -114,6 +114,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_images_scaled2.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_images_scaled2.cc Sat May 14 06:45:42 2011 +0000 @@ -89,6 +89,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_images_simple.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_images_simple.cc Sat May 14 06:45:42 2011 +0000 @@ -113,6 +113,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_links.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_links.cc Sat May 14 06:45:42 2011 +0000 @@ -93,6 +93,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_links2.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_links2.cc Sat May 14 06:45:42 2011 +0000 @@ -122,6 +122,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_lists.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_lists.cc Sat May 14 06:45:42 2011 +0000 @@ -55,6 +55,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_resource_test.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_resource_test.cc Sat May 14 06:45:42 2011 +0000 @@ -56,6 +56,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000); @@ -72,6 +73,8 @@ styleAttrs.margin.setVal (0); styleAttrs.backgroundColor = NULL; + widgetStyle = Style::create (layout, &styleAttrs); + SelectionResource *res = layout->getResourceFactory()->createListResource (ListResource::SELECTION_AT_MOST_ONE, 4); //SelectionResource *res =
--- a/test/dw_table.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_table.cc Sat May 14 06:45:42 2011 +0000 @@ -63,6 +63,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); Style *tableStyle = Style::create (layout, &styleAttrs);
--- a/test/dw_table_aligned.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_table_aligned.cc Sat May 14 06:45:42 2011 +0000 @@ -58,6 +58,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000);
--- a/test/dw_ui_test.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/dw_ui_test.cc Sat May 14 06:45:42 2011 +0000 @@ -62,6 +62,7 @@ fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); Style *tableStyle = Style::create (layout, &styleAttrs); @@ -120,7 +121,7 @@ const char *radiovalues[] = { "radio1", "radio2", NULL }; form->addRadioButtonResource ("val3", radiores1, radiovalues); form->addCheckButtonResource ("check", checkres); - const char *selvalues[] = { "i1", "i11", "i12", "i13", "i2", + const char *selvalues[] = { "i1", "g1", "i11", "i12", "i13", "i2", "g2", "i21", "i22", "i23", "i3", NULL }; form->addSelectionResource ("val4", selres[0], selvalues); form->addSelectionResource ("val5", selres[1], selvalues); @@ -208,9 +209,9 @@ selres[i]->addItem("item 1/3", false, false); selres[i]->popGroup(); - selres[i]->addItem("item 2", true, i == 1); + selres[i]->addItem("item 2", false, i == 1); - selres[i]->pushGroup("group 2", false); + selres[i]->pushGroup("group 2", true); selres[i]->addItem("item 2/1", true, false); selres[i]->addItem("item 2/2", true, false); selres[i]->addItem("item 2/3", false, false);
--- a/test/form.cc Sat May 14 06:43:17 2011 +0000 +++ b/test/form.cc Sat May 14 06:45:42 2011 +0000 @@ -32,7 +32,7 @@ Form::ResourceDecorator::~ResourceDecorator () { - delete name; + free((char *)name); } Form::TextResourceDecorator::TextResourceDecorator (const char *name, @@ -57,15 +57,15 @@ while (values[n]) n++; this->values = new const char*[n + 1]; - for(int i = 0; i < n; i++) + for (int i = 0; i < n; i++) this->values[i] = strdup (values[i]); this->values[n] = 0; } Form::RadioButtonResourceDecorator::~RadioButtonResourceDecorator () { - for(int i = 0; values[i]; i++) - delete values[i]; + for (int i = 0; values[i]; i++) + free((char *)values[i]); delete[] values; } @@ -115,7 +115,7 @@ Form::SelectionResourceDecorator::~SelectionResourceDecorator () { for(int i = 0; values[i]; i++) - delete values[i]; + free((char *)values[i]); delete[] values; } @@ -159,8 +159,8 @@ Form::FormClickedReceiver::~FormClickedReceiver () { - delete name; - delete[] value; + free((char *)name); + free((char *)value); } void Form::FormClickedReceiver::clicked (Resource *resource,