--- /dev/null
+
+# Opciones para el compilador C++.
+CXXFLAGS = -Wall -ansi -pedantic
+
+ifdef DEBUG
+CXXFLAGS += -ggdb -DDEBUG -fno-inline
+else
+CXXFLAGS += -O2 -DNDEBUG
+endif
+
+all: hashtable_test heap_test
+
+hashtable_test.o: ../src/persona.h ../src/hashtable.h hashtable_test.cpp
+
+hashtable_test: hashtable_test.o ../src/persona.o
+ $(CXX) $(LDFLAGS) hashtable_test.o ../src/persona.o $(LOADLIBES) $(LDLIBS) -o hashtable_test
+
+heap_test.o: ../src/heap.h heap_test.cpp
+
+heap_test: ../src/heap.h heap_test.o
+ $(CXX) $(LDFLAGS) heap_test.o $(LOADLIBES) $(LDLIBS) -o heap_test
+
+# REGLAS
+#########
+
+.PHONY: clean
+
+clean:
+ @$(RM) -fv *.o heap_test hashtable_test
+
--- /dev/null
+#include "../src/hashtable.h"
+#include "../src/persona.h"
+#include <iostream>
+#include <stdexcept>
+
+int main()
+{
+ HashTable< Persona* > hash(20);
+ hash["luca"] = new Persona("luca", Persona::M, 20);
+ hash["alb"] = new Persona("albertito", Persona::M, 20);
+ hash["eze"] = new Persona("eze", Persona::M, 20);
+ std::cout << (*hash["luca"]) << "\n";
+ std::cout << (*hash["alb"]) << "\n";
+ std::cout << (*hash["eze"]) << "\n";
+ std::cout << hash["no_existo"] << "\n";
+ try
+ {
+ hash.get("menos_existo");
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << e.what() << "\n";
+ }
+ return 0;
+}
+
--- /dev/null
+#include "../src/heap.h"
+#include <vector>
+#include <iostream>
+#include <iterator>
+#include <algorithm>
+#include <functional>
+#include <cstdlib>
+
+
+int main(int argc, char* argv[])
+{
+ if (argc != 2)
+ {
+ std::cerr << "Uso: " << argv[0] << " cantidad\n";
+ return 1;
+ }
+ const int SIZE = atoi(argv[1]);
+ std::vector< int > v;
+ for (int i = 0; i < SIZE; ++i)
+ {
+ heap_push(v, rand() % (SIZE*10), std::less< int >());
+ }
+ for (int i = 0; i < SIZE; ++i)
+ {
+ std::cout << heap_pop(v, std::less< int >()) << "\n";
+ }
+ return 0;
+}
+