This comment is confusing -- the error for the ASSUMEUNIQUE case is for the primary key and has nothing to do with the substr constraint.
I would leave the primary key out of this test case to avoid confusion.