if I choose to integrate it over the square of vertices $(0,0),\,(0,1),\,(1,0),\,(1,1)$
then $\int_\text{square} w = \int_{0}^{1} t\,dt = \frac 12 \neq 0 $
so since the integral over a closed curve isn't zero it's not exact, right ?
is my way of evaluating the integral correct ?
You are correct that integrating over the sides of a square (or any other closed path) and getting a non-zero answer would show the form is not exact.
But that is not what you did in this integral. Instead of integrating over the sides of the square. You have integrated along a diagonal of the square. This is not a closed path, so it proves nothing.
To integrate the path you intended, you need to parameterize each of the 4 sides: from $(0,0)$ to $(0,1)$, then from $(0,1)$ to $(1,1)$, then from $(1,1)$ to $(1, 0)$, then from $(1,0)$ to $(0,0)$. Then you will have a closed path.