Skip to content

Commit eacde2f

Browse files
author
Vladimir Diaconescu
committed
[tema1] inlining with elf git
1 parent b9c7977 commit eacde2f

17 files changed

+44
-20
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*.pch
1010

1111
# Libraries
12-
*.lib
12+
#*.lib # TODO temporary
1313
*.a
1414
*.la
1515
*.lo
+3-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
add one
2-
add
3-
add two
4-
remove
5-
add three
6-
resize
7-
add EIP41414141
8-
find
9-
print_bucket abcd
1+
add asdf
2+
print
3+
bla
104
print
+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
add one
2-
resize CAT_DATORIA_GRECIEI
3-
add two
4-
bla
5-
add three
1+
add asdf
2+
add
63
print
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
add one
2+
add two
3+
print
4+
add three
5+
print_bucket abcd

1-multi/checker/_test/ref/test29.ref

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
one two three EIP41414141
1+
asdf

1-multi/checker/_test/ref/test30.ref

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
one two three

1-multi/checker/_test/ref/test31.ref

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
one two

1-multi/checker/_test/run_test.sh

+11-2
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,14 @@ test_invalid2()
186186
cleanup_test
187187
}
188188

189+
test_invalid3()
190+
{
191+
init_test
192+
$EXEC_NAME 1 $input_f > $out_f
193+
basic_test compare $out_f $ref_f
194+
cleanup_test
195+
}
196+
189197
test_ldd()
190198
{
191199
init_test
@@ -228,8 +236,9 @@ test_fun_array=( \
228236
test_stress1 "Test stress 1" 4 \
229237
test_stress2 "Test stress 2" 4 \
230238
test_stress3 "Test stress 3" 5 \
231-
test_invalid1 "Test invalid argument 1" 2 \
232-
test_invalid2 "Test invalid argument 2" 2 \
239+
test_invalid1 "Test invalid command" 2 \
240+
test_invalid2 "Test invalid argument 1" 1 \
241+
test_invalid3 "Test invalid argument 2" 1 \
233242
test_ldd "Test dynamic link" 10 \
234243
)
235244

File renamed without changes.

1-multi/checker/hash.lib

1.61 KB
Binary file not shown.

1-multi/checker/run_all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.
99

1010
first_test=0
11-
last_test=31
11+
last_test=32
1212
script=./_test/run_test.sh
1313

1414
# Call init to set up testing environment
File renamed without changes.
File renamed without changes.

1-multi/util/hash.c

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
#include "hash.h"
3+
4+
/**
5+
* Functie de hash bazata pe djb2 a lui Dan Bernstein
6+
* http://www.cse.yorku.ca/~oz/hash.html
7+
* @return valoarea de dispersie (cheia)
8+
*/
9+
unsigned int hash(const char *str, unsigned int hash_length)
10+
{
11+
unsigned int hash = 5381;
12+
int c;
13+
14+
while ((c = *str++) != 0)
15+
hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
16+
17+
return (hash % hash_length);
18+
}
19+

1-multi/util/hash.dll

31.5 KB
Binary file not shown.

1-multi/hash.h 1-multi/util/hash.h

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)