ObjFW  Diff

Differences From Artifact [201b5d89a5]:

To Artifact [9d8c2f0a96]:


74
75
76
77
78
79
80







81
82
83
84
85
	CATCH_EXCEPTION([obj freeMem: p], OFMemNotPartOfObjException)
	CATCH_EXCEPTION([obj freeMem: q], OFMemNotPartOfObjException)
	CATCH_EXCEPTION([obj freeMem: r], OFMemNotPartOfObjException)
	puts("Got all 3!");
	
	puts("Trying to allocate more memory than possible...");
	CATCH_EXCEPTION(p = [obj getMem: 4294967295U], OFNoMemException)







	
	/* TODO: Test if freeing object frees all memory */

	return 0;
}







>
>
>
>
>
>
>





74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	CATCH_EXCEPTION([obj freeMem: p], OFMemNotPartOfObjException)
	CATCH_EXCEPTION([obj freeMem: q], OFMemNotPartOfObjException)
	CATCH_EXCEPTION([obj freeMem: r], OFMemNotPartOfObjException)
	puts("Got all 3!");
	
	puts("Trying to allocate more memory than possible...");
	CATCH_EXCEPTION(p = [obj getMem: 4294967295U], OFNoMemException)

	puts("Allocating 1 byte...");
	p = [obj getMem: 1];

	puts("Trying to resize that 1 byte to more than possible...");
	CATCH_EXCEPTION(p = [obj resizeMem: p toSize: 4294967295U],
	    OFNoMemException)
	
	/* TODO: Test if freeing object frees all memory */

	return 0;
}