Fix unit test: conversion to unsigned type when the type is negative