Đã hoàn thành

Conversion of HTML pages to Delphi unit tests - 26/04/2018 05:47 EDT

I like to have the Delphi code examples of the website DelphiBasics:

[url removed, login to view]

as a kind of DUnit test cases. The exact specification follows below.

The work should be done automatically with an according Perl or Python script. Delphi knowledge isn't necessary but advisable.

You can download a hand made example, which I made from

[url removed, login to view]

I explain the desired specification with this example.

1. at the upper right corner of

[url removed, login to view]

there is an index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z $

For each letter a list of examples for Delphi keywords is shown. For each referenced page a delphi test unit shall be created.

2. The name of the unit shall be the name of the example in lower case with the prefix "dbsc_". E.g. "Array" -> "dbsc_array".

3. Every unit test has to start with the following 5 lines, but with the according keyword instead of "array":

--------

unit dbsc_array;

//[url removed, login to view]

interface

function ArrayTest: boolean;

implementation

---------

4. On the array page you see the green block with the text:

Example code : Declaring and using static arrays

Such green blocks, beginning with the words "Example code", become the start of a test function. The functions have to be numbered. In the example:

-------

function ArrayTest1: boolean;

--------

5. The following block with code has to be copied into the unit test file.

--------

var

// Define static arrays

wordArray : Array[Word] of Integer; // Static, size=High(Word)

...

---------

6. The following green block quotes an expected output. This also has to be copied into the unit test file and it has to be put into curly brackets:

---------

{

wordArray length = 65536

wordArray lowest element = 0

...

}

----------

7. At the bottom of the produced unit test, a complete test function has to be written, where all function hitherto have to be called:

----------

function ArrayTest: boolean;

begin

result := true;

result := result and ArrayTest1;

result := result and ArrayTest2;

result := result and ArrayTest3;

end;

end.

----------

This is only the first step of the conversion to unit tests. Maybe that there will be a second job to complete it. But that job would require Delphi knowledge.

Kĩ năng: Perl, Python

Xem nhiều hơn: rss html pages delphi, delphi extract table html pages, php extract data html pages, flash reloading html pages, convert html pages php, create form html pages, flash menu html pages, free coming soon html pages, javascript hide show html pages, convert english html pages spanish, generate static html pages sql database, iphone app unit tests, convert html pages joomla templates, premade html pages, insert html pages css

Về Bên Thuê:
( 1 Nhận xét ) Hamburg, Germany

ID dự án: #16785473

Được trao cho:

freelance4hire80

Hi I can make a Perl script to generate the unit tests from html pages ________________________________________________________________________

$166 USD trong 3 ngày
(50 Đánh Giá)
6.6

4 freelancer đang chào giá trung bình $112 cho công việc này

$30 USD trong 1 ngày
(3 Nhận xét)
3.3
RemoteKey

With few years programming in Delphi and recently using Python for any kind manipulation with text, files, scraping etc. we are confident that this job will be done in agreed time frame and with expected quality. More Thêm

$200 USD trong 3 ngày
(1 Nhận xét)
1.4
saianupkumarp99

With 9 years of experience in Python(Scraping, Automation) I’m confident I can complete this project...

$50 USD trong 2 ngày
(1 Nhận xét)
0.3